@delopay/sdk 0.390.0 → 0.392.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1638,6 +1638,29 @@ var Customers = class {
1638
1638
  async retrieve(customerId) {
1639
1639
  return this.request("GET", `/customers/${encodeURIComponent(customerId)}`);
1640
1640
  }
1641
+ /**
1642
+ * Place an existing customer in a shop of the merchant, so the shop's API keys and team members
1643
+ * find the customer before any payment. The customer keeps the shops they already belong to;
1644
+ * placing one already in the shop changes nothing (`already_in_shop`). Needs a merchant-wide key:
1645
+ * a key bound to one shop is refused. `POST /customers/{customer_id}/shops`
1646
+ *
1647
+ * @param customerId - The customer to place.
1648
+ * @param profileId - The shop. It must belong to the merchant.
1649
+ */
1650
+ async placeInShop(customerId, profileId, options) {
1651
+ return this.request("POST", `/customers/${encodeURIComponent(customerId)}/shops`, {
1652
+ body: { profile_id: profileId },
1653
+ ...options
1654
+ });
1655
+ }
1656
+ /**
1657
+ * Place up to 500 existing customers in one shop of the merchant, for example after an import.
1658
+ * The answer lists every distinct customer in request order with what happened: `placed`,
1659
+ * `already_in_shop` or `not_found`. Needs a merchant-wide key. `POST /customers/shops/place`
1660
+ */
1661
+ async placeManyInShop(params, options) {
1662
+ return this.request("POST", "/customers/shops/place", { body: params, ...options });
1663
+ }
1641
1664
  /**
1642
1665
  * Update an existing customer's details.
1643
1666
  *