@delopay/sdk 0.331.0 → 0.334.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
@@ -6725,6 +6725,77 @@ var SellToRestrictions = class {
6725
6725
  options
6726
6726
  );
6727
6727
  }
6728
+ /**
6729
+ * One project's own policy, if it has one.
6730
+ * `GET /sell-to-restrictions/projects/{project_id}`
6731
+ */
6732
+ async retrieveProject(projectId) {
6733
+ return this.request("GET", `/sell-to-restrictions/projects/${encodeURIComponent(projectId)}`);
6734
+ }
6735
+ /**
6736
+ * Give one project its own policy. It replaces the merchant-wide policy for
6737
+ * every shop of the project's subtree without an override or a nearer
6738
+ * project policy, from their next payment on. An empty `blocked_countries`
6739
+ * lifts every restriction for them. Recorded in the audit log first.
6740
+ * `PUT /sell-to-restrictions/projects/{project_id}`
6741
+ */
6742
+ async updateProjectPolicy(projectId, params, options) {
6743
+ return this.request("PUT", `/sell-to-restrictions/projects/${encodeURIComponent(projectId)}`, {
6744
+ body: params,
6745
+ ...options
6746
+ });
6747
+ }
6748
+ /**
6749
+ * Remove one project's policy, so its subtree inherits from above again.
6750
+ * Removing a policy the project does not have changes nothing.
6751
+ * `DELETE /sell-to-restrictions/projects/{project_id}`
6752
+ */
6753
+ async deleteProjectPolicy(projectId, options) {
6754
+ return this.request(
6755
+ "DELETE",
6756
+ `/sell-to-restrictions/projects/${encodeURIComponent(projectId)}`,
6757
+ options
6758
+ );
6759
+ }
6760
+ /**
6761
+ * One payment connector account's own policy (todos#504), and which buyer
6762
+ * signals its payments can be judged on. Needs the merchant-level `Read`
6763
+ * rung; a shop-scoped role is refused.
6764
+ * `GET /sell-to-restrictions/connectors/{merchant_connector_id}`
6765
+ */
6766
+ async retrieveConnectorPolicy(merchantConnectorId) {
6767
+ return this.request(
6768
+ "GET",
6769
+ `/sell-to-restrictions/connectors/${encodeURIComponent(merchantConnectorId)}`
6770
+ );
6771
+ }
6772
+ /**
6773
+ * Give one payment connector account its own policy. It applies on top of
6774
+ * each shop's policy, in every shop the account serves, from the next
6775
+ * payment on: a buyer it refuses is routed to another account of the shop.
6776
+ * Needs the merchant-wide `Write` rung and write visibility for the
6777
+ * processor; recorded in the audit log first.
6778
+ * `PUT /sell-to-restrictions/connectors/{merchant_connector_id}`
6779
+ */
6780
+ async updateConnectorPolicy(merchantConnectorId, params, options) {
6781
+ return this.request(
6782
+ "PUT",
6783
+ `/sell-to-restrictions/connectors/${encodeURIComponent(merchantConnectorId)}`,
6784
+ { body: params, ...options }
6785
+ );
6786
+ }
6787
+ /**
6788
+ * Remove one connector account's own policy; each shop's policy still
6789
+ * applies. Removing a policy the account does not have changes nothing.
6790
+ * `DELETE /sell-to-restrictions/connectors/{merchant_connector_id}`
6791
+ */
6792
+ async deleteConnectorPolicy(merchantConnectorId, options) {
6793
+ return this.request(
6794
+ "DELETE",
6795
+ `/sell-to-restrictions/connectors/${encodeURIComponent(merchantConnectorId)}`,
6796
+ options
6797
+ );
6798
+ }
6728
6799
  /**
6729
6800
  * Which checks each payment path performs, and how this deployment resolves
6730
6801
  * a buyer's country — read before relying on a restriction for a path.