/** * @param int $blogId * @param int $articleId * @param GenericEntity $article * @return GenericEntity */ public function update($blogId, $articleId, GenericEntity $article) { $request = new PutJson('/admin/blogs/' . $blogId . '/articles/' . $articleId . '.json', array('article' => $article->toArray())); $response = $this->send($request); return $this->createEntity($response->get('article')); }
/** * @param int $savedSearchId * @param GenericEntity $savedSearch * @return GenericEntity */ public function update($savedSearchId, GenericEntity $savedSearch) { $request = new PutJson('/admin/customer_saved_searches/' . $savedSearchId . '.json', array('customer_saved_search' => $savedSearch->toArray())); $response = $this->send($request); return $this->createEntity($response->get('customer_saved_search')); }
/** * @param int $pageId * @param GenericEntity $page * @return GenericEntity */ public function update($pageId, GenericEntity $page) { $request = new PutJson('/admin/pages/' . $pageId . '.json', array('page' => $page->toArray())); $response = $this->send($request); return $this->createEntity($response->get('page')); }
/** * @param GenericEntity $recurringApplicationCharge * @return GenericEntity */ public function create(GenericEntity $recurringApplicationCharge) { $request = new PostJson('/admin/recurring_application_charges.json', array('recurring_application_charge' => $recurringApplicationCharge->toArray())); $response = $this->send($request); return $this->createEntity($response->get('recurring_application_charge')); }
/** * @param int $fulfillmentServiceId * @param GenericEntity $fulfillmentService * @return GenericEntity */ public function update($fulfillmentServiceId, GenericEntity $fulfillmentService) { $request = new PutJson('/admin/fulfillment_services/' . $fulfillmentServiceId . '.json', array('fulfillment_service' => $fulfillmentService->toArray())); $response = $this->send($request); return $this->createEntity($response->get('fulfillment_service')); }
/** * @param int $themeId * @param GenericEntity $theme * @return GenericEntity */ public function update($themeId, $theme) { $request = new PutJson('/admin/themes/' . $themeId . '.json', array('theme' => $theme->toArray())); $response = $this->send($request); return $this->create($response->get('theme')); }
/** * @param int $customerId * @param int $addressId * @param GenericEntity $address * @return GenericEntity */ public function update($customerId, $addressId, GenericEntity $address) { $request = new PutJson('/admin/customers/' . $customerId . '/addresses/' . $addressId . '.json', array('address' => $address->toArray())); $response = $this->send($request); return $this->createEntity($response->get('customer_address')); }
/** * @param int $orderId * @param int $fulfillmentId * @param GenericEntity $fulfillment * @return GenericEntity */ public function update($orderId, $fulfillmentId, GenericEntity $fulfillment) { $request = new PutJson('/admin/orders/' . $orderId . '/fulfillments/' . $fulfillmentId . '.json', array('fulfillment' => $fulfillment->toArray())); $response = $this->send($request); return $this->createEntity($response->get('fulfillment')); }
/** * @param int $countryId * @param GenericEntity $country * @return GenericEntity */ public function update($countryId, GenericEntity $country) { $request = new PutJson('/admin/countries/' . $countryId . '.json', array('country' => $country->toArray())); $response = $this->send($request); return $this->createEntity($response->get('country')); }
/** * @param int $orderId * @param int $orderRisksId * @param GenericEntity $orderRisks * @return GenericEntity */ public function update($orderId, $orderRisksId, GenericEntity $orderRisks) { $request = new PutJson('/admin/orders/' . $orderId . '/risks/' . $orderRisksId . '.json', array('risk' => $orderRisks->toArray())); $response = $this->send($request); return $this->createEntity($response->get('risk')); }
/** * @param int $metafieldId * @param int $productId * @param GenericEntity $metafield * @return GenericEntity */ public function updateProductMetafield($metafieldId, $productId, GenericEntity $metafield) { $request = new PutJson('/admin/products/' . $productId . '/metafields/' . $metafieldId . '.json', array('metafield' => $metafield->toArray())); $response = $this->send($request); return $this->createEntity($response->get('metafield')); }
/** * @param int $customerId * @param GenericEntity $customer * @return GenericEntity */ public function update($customerId, GenericEntity $customer) { $request = new PostJson('/admin/customers/' . $customerId . '.json', array('customer' => $customer->toArray())); $response = $this->send($request); return $this->createEntity($response->get('customer')); }
/** * @param int $carrierServiceId * @param GenericEntity $carrierService * @return GenericEntity */ public function update($carrierServiceId, GenericEntity $carrierService) { $request = new PostJson('/admin/carrier_services/' . $carrierServiceId . '.json', array('carrier_service' => $carrierService->toArray())); $response = $this->send($request); return $this->createEntity($response->get('carrier_service')); }
/** * @param int $variantId * @param GenericEntity $variant * @return GenericEntity */ public function update($variantId, GenericEntity $variant) { $request = new PutJson('/admin/variants/' . $variantId . '.json', array('variant' => $variant->toArray())); $response = $this->send($request); return $this->createEntity($response->get('variant')); }
/** * @param GenericEntity $webhook * @return GenericEntity */ public function update($webhookId, GenericEntity $webhook) { $request = new PutJson('/admin/webooks/' . $webhookId . '.json', array('webhook' => $webhook->toArray())); $response = $this->send($request); return $this->createEntity($response->get('webhook')); }
/** * @param int $smartCollectionId * @param GenericEntity $smartCollection * @return GenericEntity */ public function update($smartCollectionId, GenericEntity $smartCollection) { $request = new PutJson('/admin/smart_collections/' . $smartCollectionId . '.json', array('smart_collection' => $smartCollection->toArray())); $response = $this->send($request); return $this->createEntity($response->get('smart_collection')); }
/** * @param GenericEntity $collect * @return GenericEntity */ public function create(GenericEntity $collect) { $request = new PostJson('/admin/collects.json', array('collect' => $collect->toArray())); $response = $this->send($request); return $this->createEntity($response->get('collect')); }