phoenixnap / phoenixnap.bmc / 1.17.0 / module / transaction_info List of client's transactions. | "added in version" 1.17.0 of phoenixnap.bmc" Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com> preview | supported by certifiedphoenixnap.bmc.transaction_info (1.17.0) — module
Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0
collections: - name: phoenixnap.bmc version: 1.17.0
List transactions.
This module has a dependency on requests
API is documented at U(https://developers.phoenixnap.com/docs/payments/1/routes/transactions/get).
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret' # in location: ~/.pnap/config.yaml - name: List all transactions. hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List transactions. phoenixnap.bmc.transaction_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" register: output - name: Print the gathered infos ansible.builtin.debug: var: output.transactions
- name: Get transaction details. hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: Get transaction details. phoenixnap.bmc.transaction_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" transaction_id: 0a1b2c3d4f5g6h7i8j9k register: output - name: Print the gathered infos ansible.builtin.debug: var: output.transactions
limit: description: The limit of the number of results returned. type: int offset: description: The number of items to skip in the results. type: int to_date: description: To the date and time (inclusive) to filter transactions by. type: str client_id: description: Client ID (Application Management) type: str from_date: description: From the date and time (inclusive) to filter transactions by. type: str sort_field: description: If a sortField is requested, pagination will be done after sorting. type: str client_secret: description: Client Secret (Application Management) type: str sort_direction: description: Sort Given Field depending on the desired direction. type: str transaction_id: description: The transaction identifier. type: str
transactions: contains: limit: description: Maximum number of items in the page (actual returned length can be less). sample: 5 type: int offset: description: The number of returned items skipped. sample: 25 type: int results: contains: amount: description: The transaction amount. sample: 10.99 type: float cardPaymentMethodDetails: description: Card payment details of a transaction. type: str date: description: Date and time when transaction was created. type: str details: description: Details about the transaction. sample: Transaction failed due to credit card expiration. type: str id: description: The Transaction ID. sample: 5fa54d1e91867c03a0a7b4a4 type: str metadata: description: Transaction's metadata. type: str status: description: The Transaction status. sample: FAILED type: str description: transaction details type: list total: description: The total number of records available for retrieval. sample: 400 type: int description: The transactions information as list returned: success type: dict