inttegro.resources.purchase_intents
Generated public typing surface. Do not edit by hand.
1"""Purchase intent resource for Pages Buy links.""" 2 3from __future__ import annotations 4 5from ..http_client import HttpClient 6 7 8class PurchaseIntents: 9 """Create, update, cancel, look up, and page Buy link purchase intents. 10 11 Access this service as ``InttegroClient.purchase_intents``. Methods use the client's shared transport and return the typed resource shapes documented below. 12 """ 13 14 def __init__(self, http: HttpClient): 15 self.http = http 16 17 def create(self, payload: dict): 18 """Create a Buy link purchase intent. 19 20 API endpoint: ``/purchase_intents/create``. 21 22 Args: 23 payload (dict): Typed request object or equivalent request mapping for this operation. 24 25 Returns: 26 ``PurchaseIntent`` decoded from the documented response shape. 27 28 Raises: 29 APIError: The API rejected the request or could not complete it. 30 NetworkError: The request could not reach the Inttegro API. 31 TimeoutError: The configured request deadline elapsed. 32 """ 33 return self.http.post("/purchase_intents/create", payload) 34 35 def update(self, payload: dict): 36 """Update mutable Buy link purchase intent fields. 37 38 API endpoint: ``/purchase_intents/update``. 39 40 Args: 41 payload (dict): Typed request object or equivalent request mapping for this operation. 42 43 Returns: 44 ``PurchaseIntent`` decoded from the documented response shape. 45 46 Raises: 47 APIError: The API rejected the request or could not complete it. 48 NetworkError: The request could not reach the Inttegro API. 49 TimeoutError: The configured request deadline elapsed. 50 """ 51 return self.http.post("/purchase_intents/update", payload) 52 53 def cancel(self, id: str): 54 """Cancel a Buy link purchase intent. 55 56 API endpoint: ``/purchase_intents/cancel``. 57 58 Args: 59 id (str): Unique identifier of the id. 60 61 Returns: 62 ``PurchaseIntent`` decoded from the documented response shape. 63 64 Raises: 65 APIError: The API rejected the request or could not complete it. 66 NetworkError: The request could not reach the Inttegro API. 67 TimeoutError: The configured request deadline elapsed. 68 """ 69 return self.http.post("/purchase_intents/cancel", {"id": id}) 70 71 def lookup(self, id: str): 72 """Retrieve a Buy link purchase intent by ID. 73 74 API endpoint: ``/purchase_intents/lookup``. 75 76 Args: 77 id (str): Unique identifier of the id. 78 79 Returns: 80 ``PurchaseIntent`` decoded from the documented response shape. 81 82 Raises: 83 APIError: The API rejected the request or could not complete it. 84 NetworkError: The request could not reach the Inttegro API. 85 TimeoutError: The configured request deadline elapsed. 86 """ 87 return self.http.post("/purchase_intents/lookup", {"id": id}) 88 89 def page(self, payload: dict): 90 """List Buy link purchase intents. 91 92 API endpoint: ``/purchase_intents/page``. 93 94 Args: 95 payload (dict): Typed request object or equivalent request mapping for this operation. 96 97 Returns: 98 ``Page`` decoded from the documented response shape. 99 100 Raises: 101 APIError: The API rejected the request or could not complete it. 102 NetworkError: The request could not reach the Inttegro API. 103 TimeoutError: The configured request deadline elapsed. 104 """ 105 return self.http.post("/purchase_intents/page", payload)
9class PurchaseIntents: 10 """Create, update, cancel, look up, and page Buy link purchase intents. 11 12 Access this service as ``InttegroClient.purchase_intents``. Methods use the client's shared transport and return the typed resource shapes documented below. 13 """ 14 15 def __init__(self, http: HttpClient): 16 self.http = http 17 18 def create(self, payload: dict): 19 """Create a Buy link purchase intent. 20 21 API endpoint: ``/purchase_intents/create``. 22 23 Args: 24 payload (dict): Typed request object or equivalent request mapping for this operation. 25 26 Returns: 27 ``PurchaseIntent`` decoded from the documented response shape. 28 29 Raises: 30 APIError: The API rejected the request or could not complete it. 31 NetworkError: The request could not reach the Inttegro API. 32 TimeoutError: The configured request deadline elapsed. 33 """ 34 return self.http.post("/purchase_intents/create", payload) 35 36 def update(self, payload: dict): 37 """Update mutable Buy link purchase intent fields. 38 39 API endpoint: ``/purchase_intents/update``. 40 41 Args: 42 payload (dict): Typed request object or equivalent request mapping for this operation. 43 44 Returns: 45 ``PurchaseIntent`` decoded from the documented response shape. 46 47 Raises: 48 APIError: The API rejected the request or could not complete it. 49 NetworkError: The request could not reach the Inttegro API. 50 TimeoutError: The configured request deadline elapsed. 51 """ 52 return self.http.post("/purchase_intents/update", payload) 53 54 def cancel(self, id: str): 55 """Cancel a Buy link purchase intent. 56 57 API endpoint: ``/purchase_intents/cancel``. 58 59 Args: 60 id (str): Unique identifier of the id. 61 62 Returns: 63 ``PurchaseIntent`` decoded from the documented response shape. 64 65 Raises: 66 APIError: The API rejected the request or could not complete it. 67 NetworkError: The request could not reach the Inttegro API. 68 TimeoutError: The configured request deadline elapsed. 69 """ 70 return self.http.post("/purchase_intents/cancel", {"id": id}) 71 72 def lookup(self, id: str): 73 """Retrieve a Buy link purchase intent by ID. 74 75 API endpoint: ``/purchase_intents/lookup``. 76 77 Args: 78 id (str): Unique identifier of the id. 79 80 Returns: 81 ``PurchaseIntent`` decoded from the documented response shape. 82 83 Raises: 84 APIError: The API rejected the request or could not complete it. 85 NetworkError: The request could not reach the Inttegro API. 86 TimeoutError: The configured request deadline elapsed. 87 """ 88 return self.http.post("/purchase_intents/lookup", {"id": id}) 89 90 def page(self, payload: dict): 91 """List Buy link purchase intents. 92 93 API endpoint: ``/purchase_intents/page``. 94 95 Args: 96 payload (dict): Typed request object or equivalent request mapping for this operation. 97 98 Returns: 99 ``Page`` decoded from the documented response shape. 100 101 Raises: 102 APIError: The API rejected the request or could not complete it. 103 NetworkError: The request could not reach the Inttegro API. 104 TimeoutError: The configured request deadline elapsed. 105 """ 106 return self.http.post("/purchase_intents/page", payload)
Create, update, cancel, look up, and page Buy link purchase intents.
Access this service as InttegroClient.purchase_intents. Methods use the client's shared transport and return the typed resource shapes documented below.
18 def create(self, payload: dict): 19 """Create a Buy link purchase intent. 20 21 API endpoint: ``/purchase_intents/create``. 22 23 Args: 24 payload (dict): Typed request object or equivalent request mapping for this operation. 25 26 Returns: 27 ``PurchaseIntent`` decoded from the documented response shape. 28 29 Raises: 30 APIError: The API rejected the request or could not complete it. 31 NetworkError: The request could not reach the Inttegro API. 32 TimeoutError: The configured request deadline elapsed. 33 """ 34 return self.http.post("/purchase_intents/create", payload)
Create a Buy link purchase intent.
API endpoint: /purchase_intents/create.
Arguments:
- payload (dict): Typed request object or equivalent request mapping for this operation.
Returns:
PurchaseIntentdecoded from the documented response shape.
Raises:
- APIError: The API rejected the request or could not complete it.
- NetworkError: The request could not reach the Inttegro API.
- TimeoutError: The configured request deadline elapsed.
36 def update(self, payload: dict): 37 """Update mutable Buy link purchase intent fields. 38 39 API endpoint: ``/purchase_intents/update``. 40 41 Args: 42 payload (dict): Typed request object or equivalent request mapping for this operation. 43 44 Returns: 45 ``PurchaseIntent`` decoded from the documented response shape. 46 47 Raises: 48 APIError: The API rejected the request or could not complete it. 49 NetworkError: The request could not reach the Inttegro API. 50 TimeoutError: The configured request deadline elapsed. 51 """ 52 return self.http.post("/purchase_intents/update", payload)
Update mutable Buy link purchase intent fields.
API endpoint: /purchase_intents/update.
Arguments:
- payload (dict): Typed request object or equivalent request mapping for this operation.
Returns:
PurchaseIntentdecoded from the documented response shape.
Raises:
- APIError: The API rejected the request or could not complete it.
- NetworkError: The request could not reach the Inttegro API.
- TimeoutError: The configured request deadline elapsed.
54 def cancel(self, id: str): 55 """Cancel a Buy link purchase intent. 56 57 API endpoint: ``/purchase_intents/cancel``. 58 59 Args: 60 id (str): Unique identifier of the id. 61 62 Returns: 63 ``PurchaseIntent`` decoded from the documented response shape. 64 65 Raises: 66 APIError: The API rejected the request or could not complete it. 67 NetworkError: The request could not reach the Inttegro API. 68 TimeoutError: The configured request deadline elapsed. 69 """ 70 return self.http.post("/purchase_intents/cancel", {"id": id})
Cancel a Buy link purchase intent.
API endpoint: /purchase_intents/cancel.
Arguments:
- id (str): Unique identifier of the id.
Returns:
PurchaseIntentdecoded from the documented response shape.
Raises:
- APIError: The API rejected the request or could not complete it.
- NetworkError: The request could not reach the Inttegro API.
- TimeoutError: The configured request deadline elapsed.
72 def lookup(self, id: str): 73 """Retrieve a Buy link purchase intent by ID. 74 75 API endpoint: ``/purchase_intents/lookup``. 76 77 Args: 78 id (str): Unique identifier of the id. 79 80 Returns: 81 ``PurchaseIntent`` decoded from the documented response shape. 82 83 Raises: 84 APIError: The API rejected the request or could not complete it. 85 NetworkError: The request could not reach the Inttegro API. 86 TimeoutError: The configured request deadline elapsed. 87 """ 88 return self.http.post("/purchase_intents/lookup", {"id": id})
Retrieve a Buy link purchase intent by ID.
API endpoint: /purchase_intents/lookup.
Arguments:
- id (str): Unique identifier of the id.
Returns:
PurchaseIntentdecoded from the documented response shape.
Raises:
- APIError: The API rejected the request or could not complete it.
- NetworkError: The request could not reach the Inttegro API.
- TimeoutError: The configured request deadline elapsed.
90 def page(self, payload: dict): 91 """List Buy link purchase intents. 92 93 API endpoint: ``/purchase_intents/page``. 94 95 Args: 96 payload (dict): Typed request object or equivalent request mapping for this operation. 97 98 Returns: 99 ``Page`` decoded from the documented response shape. 100 101 Raises: 102 APIError: The API rejected the request or could not complete it. 103 NetworkError: The request could not reach the Inttegro API. 104 TimeoutError: The configured request deadline elapsed. 105 """ 106 return self.http.post("/purchase_intents/page", payload)
List Buy link purchase intents.
API endpoint: /purchase_intents/page.
Arguments:
- payload (dict): Typed request object or equivalent request mapping for this operation.
Returns:
Pagedecoded from the documented response shape.
Raises:
- APIError: The API rejected the request or could not complete it.
- NetworkError: The request could not reach the Inttegro API.
- TimeoutError: The configured request deadline elapsed.