/**
  * @summary Read a polymer
  *
  * @return EntityRequest
  */
 public function retrieve()
 {
     $request = new EntityRequest();
     $request->setConnection($this->_getConnection());
     $request->setEndpoint($this);
     $detail = new ApiRequestDetail();
     $detail->setRequireAuth(true);
     $detail->setUrl($this->_buildUrl(str_replace(array_keys($this->_replacements), array_values($this->_replacements), 'polymers/{polymerFid}')));
     $detail->setMethod('GET');
     $request->setRequestDetail($detail);
     return $request;
 }
Exemplo n.º 2
0
 protected function _prepareResult($result)
 {
     $return = parent::_prepareResult($result);
     if (!empty($return->subItems)) {
         $tmp = [];
         foreach ($return->subItems as $itm) {
             $tmp[] = (new InvoiceSubItemRequest())->hydrate($itm);
         }
         $return->subItems = $tmp;
     }
     return $return;
 }
Exemplo n.º 3
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["couponCode" => $this->getCouponCode(), "applyFid" => $this->getApplyFid(), "maxUsages" => $this->getMaxUsages(), "expiryTime" => $this->getExpiryTime(), "discountAmount" => $this->getDiscountAmount(), "discountType" => $this->getDiscountType(), "setupDiscountAmount" => $this->getSetupDiscountAmount(), "setupDiscountType" => $this->getSetupDiscountType(), "term" => $this->getTerm(), "termType" => $this->getTermType(), "restrictive" => $this->isRestrictive()]);
 }
Exemplo n.º 4
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["invoiceNumber" => $this->getInvoiceNumber(), "invoiceDate" => $this->getInvoiceDate(), "currency" => $this->getCurrency(), "dueDate" => $this->getDueDate(), "paymentDate" => $this->getPaymentDate(), "amountPaid" => $this->getAmountPaid(), "baseAmount" => $this->getBaseAmount(), "discountAmount" => $this->getDiscountAmount(), "taxAmount" => $this->getTaxAmount(), "creditedAmount" => $this->getCreditedAmount(), "totalAmount" => $this->getTotalAmount(), "outstandingAmount" => $this->getOutstandingAmount(), "refundAmount" => $this->getRefundAmount(), "invoiceStatus" => $this->getInvoiceStatus()]);
 }
Exemplo n.º 5
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["address1" => $this->getAddress1(), "address2" => $this->getAddress2(), "address3" => $this->getAddress3(), "town" => $this->getTown(), "county" => $this->getCounty(), "country" => $this->getCountry(), "postalCode" => $this->getPostalCode()]);
 }
Exemplo n.º 6
0
 protected function _prepareResult($result)
 {
     $return = parent::_prepareResult($result);
     if (!empty($return->defaultPrice)) {
         $return->defaultPrice = (new ProductPriceRequest())->hydrate($return->defaultPrice);
     }
     return $return;
 }
Exemplo n.º 7
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["entityFid" => $this->getEntityFid(), "sectionName" => $this->getSectionName(), "itemName" => $this->getItemName(), "value" => $this->getValue()]);
 }
Exemplo n.º 8
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["fromDate" => $this->getFromDate(), "toDate" => $this->getToDate(), "perUnitAmount" => $this->getPerUnitAmount(), "totalAmount" => $this->getTotalAmount(), "itemType" => $this->getItemType(), "quantity" => $this->getQuantity()]);
 }
Exemplo n.º 9
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["price" => $this->getPrice(), "priceFid" => $this->getPriceFid(), "offerFid" => $this->getOfferFid(), "productFid" => $this->getProductFid(), "renewalDate" => $this->getRenewalDate()]);
 }
Exemplo n.º 10
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["nameOnCard" => $this->getNameOnCard(), "expiryMonth" => $this->getExpiryMonth(), "expiryYear" => $this->getExpiryYear(), "issue" => $this->getIssue(), "last4" => $this->getLast4(), "cardType" => $this->getCardType()]);
 }
Exemplo n.º 11
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["lastRenewed" => $this->getLastRenewed(), "renewalDate" => $this->getRenewalDate(), "paidUntil" => $this->getPaidUntil(), "cycle" => $this->getCycle(), "renewalPrice" => $this->getRenewalPrice(), "status" => $this->getStatus()]);
 }
Exemplo n.º 12
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["amount" => $this->getAmount(), "autoCancelDate" => $this->getAutoCancelDate(), "autoCharge" => $this->isAutoCharge(), "autoSuspendDate" => $this->getAutoSuspendDate(), "cancelDays" => $this->getCancelDays(), "cancelReason" => $this->getCancelReason(), "currency" => $this->getCurrency(), "cycle" => $this->getCycle(), "dateCancelled" => $this->getDateCancelled(), "dateCreated" => $this->getDateCreated(), "dateInactive" => $this->getDateInactive(), "dateModified" => $this->getDateModified(), "dateStateChanged" => $this->getDateStateChanged(), "dateSuspended" => $this->getDateSuspended(), "dateUpgraded" => $this->getDateUpgraded(), "discount" => $this->getDiscount(), "endDate" => $this->getEndDate(), "invoiceFid" => $this->getInvoiceFid(), "isPaid" => $this->isPaid(), "lastRenewDate" => $this->getLastRenewDate(), "nextPaymentDate" => $this->getNextPaymentDate(), "nextRenewalAmount" => $this->getNextRenewalAmount(), "nextRenewDate" => $this->getNextRenewDate(), "paidRenewals" => $this->getPaidRenewals(), "paidUntil" => $this->getPaidUntil(), "quantity" => $this->getQuantity(), "renewalAdvanceDays" => $this->getRenewalAdvanceDays(), "renewDate" => $this->getRenewDate(), "setupAmount" => $this->getSetupAmount(), "setupDiscount" => $this->getSetupDiscount(), "shouldCancel" => $this->isShouldCancel(), "shouldSuspend" => $this->isShouldSuspend(), "startDate" => $this->getStartDate(), "status" => $this->getStatus(), "suspendDays" => $this->getSuspendDays(), "suspendReason" => $this->getSuspendReason(), "taxAmount" => $this->getTaxAmount(), "totalAmount" => $this->getTotalAmount(), "totalRenewals" => $this->getTotalRenewals(), "trialEndDate" => $this->getTrialEndDate(), "trialStartDate" => $this->getTrialStartDate(), "uniqueReference" => $this->getUniqueReference()]);
 }
Exemplo n.º 13
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["productFid" => $this->getProductFid(), "currency" => $this->getCurrency(), "price" => $this->getPrice(), "setupFee" => $this->getSetupFee(), "cycleType" => $this->getCycleType(), "cycleTerm" => $this->getCycleTerm(), "cycleExact" => $this->getCycleExact()]);
 }