/**
  * @summary Add a new card
  *
  * @param CardDataPayload $payload
  *
  * @return FidRequest
  */
 public function create(CardDataPayload $payload)
 {
     $request = new FidRequest();
     $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), 'customers/{customerFid}/paymentMethods/cards')));
     $detail->setBody(json_encode($payload));
     $detail->setMethod('POST');
     $request->setRequestDetail($detail);
     return $request;
 }
Ejemplo n.º 2
0
 /**
  * @summary Create a new order
  *
  * @param CreateOrderPayload $payload
  *
  * @return FidRequest
  */
 public function create(CreateOrderPayload $payload)
 {
     $request = new FidRequest();
     $request->setConnection($this->_getConnection());
     $request->setEndpoint($this);
     $detail = new ApiRequestDetail();
     $detail->setRequireAuth(true);
     $detail->setUrl($this->_buildUrl('orders'));
     $detail->setBody(json_encode($payload));
     $detail->setMethod('POST');
     $request->setRequestDetail($detail);
     return $request;
 }
 /**
  * @summary Modify an existing subscription with a new price. Returns new open order to
  * be completed
  *
  * @param ModifySubscriptionPayload $payload
  *
  * @return FidRequest
  */
 public function setModify(ModifySubscriptionPayload $payload)
 {
     $request = new FidRequest();
     $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), 'customers/{customerFid}/subscriptions/{subscriptionFid}/modify')));
     $detail->setBody(json_encode($payload));
     $detail->setMethod('PUT');
     $request->setRequestDetail($detail);
     return $request;
 }
Ejemplo n.º 4
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["username" => $this->getUsername(), "language" => $this->getLanguage(), "timezone" => $this->getTimezone()]);
 }
Ejemplo n.º 5
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["displayName" => $this->getDisplayName(), "description" => $this->getDescription()]);
 }
Ejemplo n.º 6
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["name" => $this->getName(), "firstName" => $this->getFirstName(), "lastName" => $this->getLastName(), "email" => $this->getEmail(), "phone" => $this->getPhone(), "externalReference" => $this->getExternalReference()]);
 }
Ejemplo n.º 7
0
 public function jsonSerialize()
 {
     return array_merge(parent::jsonSerialize(), ["orderHash" => $this->getOrderHash(), "state" => $this->getState(), "queueFid" => $this->getQueueFid(), "offerFid" => $this->getOfferFid(), "couponCode" => $this->getCouponCode(), "amount" => $this->getAmount(), "setupAmount" => $this->getSetupAmount(), "taxAmount" => $this->getTaxAmount(), "totalAmount" => $this->getTotalAmount(), "currency" => $this->getCurrency(), "country" => $this->getCountry(), "discountAmount" => $this->getDiscountAmount(), "discountType" => $this->getDiscountType(), "approvedByFid" => $this->getApprovedByFid(), "userAgent" => $this->getUserAgent(), "userIp" => $this->getUserIp(), "paymentAccountFid" => $this->getPaymentAccountFid(), "paymentServiceType" => $this->getPaymentServiceType(), "lastPaymentFid" => $this->getLastPaymentFid(), "brandFid" => $this->getBrandFid(), "customerFid" => $this->getCustomerFid(), "fraudFid" => $this->getFraudFid(), "invoiceFid" => $this->getInvoiceFid(), "amountPaid" => $this->getAmountPaid(), "authorizeId" => $this->getAuthorizeId()]);
 }