oracle.oci.oci_onesubscription_invoice_facts – Fetches details about one or multiple Invoice resources in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 5.3.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_onesubscription_invoice_facts.

New in version 2.9.0: of oracle.oci

Synopsis

  • Fetches details about one or multiple Invoice resources in Oracle Cloud Infrastructure

  • This is a collection API which returns a list of Invoices for given filters.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
ar_customer_transaction_id
string / required
AR Unique identifier for an invoice .
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
  • security_token
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
compartment_id
string / required
The OCID of the root compartment.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
fields
list / elements=string
Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
realm_specific_endpoint_template_enabled
boolean
    Choices:
  • no
  • yes
Enable/Disable realm specific endpoint template for service client. By Default, realm specific endpoint template is disabled. If not set, then the value of the OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
sort_by
string
    Choices:
  • ORDERNUMBER
  • TIMEINVOICING
The field to sort by. You can provide one sort order ('sortOrder').
sort_order
string
    Choices:
  • ASC
  • DESC
The sort order to use, either ascending ('ASC') or descending ('DESC').
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
time_from
string
Initial date to filter Invoice data in SPM.
time_to
string
Final date to filter Invoice data in SPM.

Examples

- name: List invoices
  oci_onesubscription_invoice_facts:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    ar_customer_transaction_id: "ocid1.arcustomertransaction.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    time_from: 2013-10-20T19:20:30+01:00
    time_to: 2013-10-20T19:20:30+01:00
    sort_order: ASC
    sort_by: ORDERNUMBER
    fields: [ "fields_example" ]

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
invoices
complex
on success
List of Invoice resources

Sample:
[{'ar_invoices': 'ar_invoices_example', 'bill_to_address': {'bill_site_use_id': 56, 'is_bill_to': True, 'is_ship_to': True, 'location': {'address1': 'address1_example', 'address2': 'address2_example', 'city': 'city_example', 'country': 'country_example', 'postal_code': 'postal_code_example', 'region': 'us-phoenix-1', 'tca_location_id': 56}, 'name': 'name_example', 'phone': 'phone_example', 'service2_site_use_id': 56, 'tca_cust_acct_site_id': 56, 'tca_party_site_number': 'tca_party_site_number_example'}, 'bill_to_contact': {'email': 'email_example', 'first_name': 'first_name_example', 'last_name': 'last_name_example', 'name': 'name_example', 'tca_contact_id': 56, 'tca_cust_accnt_site_id': 56, 'tca_party_id': 56, 'user_name': 'user_name_example'}, 'bill_to_customer': {'customer_chain_type': 'customer_chain_type_example', 'is_chain_customer': True, 'is_public_sector': True, 'name': 'name_example', 'name_phonetic': 'name_phonetic_example', 'tca_customer_account_id': 56, 'tca_customer_account_number': 'tca_customer_account_number_example', 'tca_party_id': 56, 'tca_party_number': 'tca_party_number_example'}, 'created_by': 'created_by_example', 'currency': {'iso_code': 'iso_code_example', 'name': 'name_example', 'std_precision': 56}, 'invoice_lines': [{'ar_invoice_number': 'ar_invoice_number_example', 'data_center': 'data_center_example', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'product': {'billing_category': 'billing_category_example', 'name': 'name_example', 'part_number': 'part_number_example', 'product_category': 'product_category_example', 'ucm_rate_card_part_type': 'ucm_rate_card_part_type_example', 'unit_of_measure': 'unit_of_measure_example'}, 'time_end': '2013-10-20T19:20:30+01:00', 'time_start': '2013-10-20T19:20:30+01:00'}], 'organization': {'name': 'name_example', 'number': 1.2}, 'payment_method': 'payment_method_example', 'payment_term': {'created_by': 'created_by_example', 'description': 'description_example', 'is_active': True, 'name': 'name_example', 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'updated_by': 'updated_by_example', 'value': 'value_example'}, 'receipt_method': 'receipt_method_example', 'spm_invoice_number': 'spm_invoice_number_example', 'status': 'status_example', 'subscription_number': 'subscription_number_example', 'time_created': '2013-10-20T19:20:30+01:00', 'time_invoice_date': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'type': 'type_example', 'updated_by': 'updated_by_example'}]
 
ar_invoices
string
on success
AR Invoice Numbers comma separated under one invoice

Sample:
ar_invoices_example
 
bill_to_address
complex
on success

   
bill_site_use_id
integer
on success
Bill to site use Id.

Sample:
56
   
is_bill_to
boolean
on success
Identify as the customer's billing address.

Sample:
True
   
is_ship_to
boolean
on success
Identify as the customer's shipping address.

Sample:
True
   
location
complex
on success

     
address1
string
on success
Address first line.

Sample:
address1_example
     
address2
string
on success
Address second line.

Sample:
address2_example
     
city
string
on success
City.

Sample:
city_example
     
country
string
on success
Country.

Sample:
country_example
     
postal_code
string
on success
Postal code.

Sample:
postal_code_example
     
region
string
on success
Region.

Sample:
us-phoenix-1
     
tca_location_id
integer
on success
TCA Location identifier.

Sample:
56
   
name
string
on success
Address name identifier.

Sample:
name_example
   
phone
string
on success
Phone.

Sample:
phone_example
   
service2_site_use_id
integer
on success
Service to site use Id.

Sample:
56
   
tca_cust_acct_site_id
integer
on success
TCA customer account site Id.

Sample:
56
   
tca_party_site_number
string
on success
Party site number.

Sample:
tca_party_site_number_example
 
bill_to_contact
complex
on success

   
email
string
on success
Email.

Sample:
email_example
   
first_name
string
on success
First name.

Sample:
first_name_example
   
last_name
string
on success
Last name.

Sample:
last_name_example
   
name
string
on success
Name.

Sample:
name_example
   
tca_contact_id
integer
on success
TCA contact ID.

Sample:
56
   
tca_cust_accnt_site_id
integer
on success
TCA customer account site ID.

Sample:
56
   
tca_party_id
integer
on success
TCA party ID.

Sample:
56
   
user_name
string
on success
userName.

Sample:
user_name_example
 
bill_to_customer
complex
on success

   
customer_chain_type
string
on success
Customer chain type.

Sample:
customer_chain_type_example
   
is_chain_customer
boolean
on success
The business partner is chain customer or not.

Sample:
True
   
is_public_sector
boolean
on success
The business partner is part of the public sector or not.

Sample:
True
   
name
string
on success
Commercial name also called customer name.

Sample:
name_example
   
name_phonetic
string
on success
Phonetic name.

Sample:
name_phonetic_example
   
tca_customer_account_id
integer
on success
TCA customer account ID.

Sample:
56
   
tca_customer_account_number
string
on success
TCA customer account number.

Sample:
tca_customer_account_number_example
   
tca_party_id
integer
on success
TCA party ID.

Sample:
56
   
tca_party_number
string
on success
TCA party number.

Sample:
tca_party_number_example
 
created_by
string
on success
User that executed SPM Invoice process

Sample:
created_by_example
 
currency
complex
on success

   
iso_code
string
on success
Currency Code

Sample:
iso_code_example
   
name
string
on success
Currency name

Sample:
name_example
   
std_precision
integer
on success
Standard Precision of the Currency

Sample:
56
 
invoice_lines
complex
on success
Invoice Lines under particular invoice.

   
ar_invoice_number
string
on success
AR Invoice Number for Invoice Line

Sample:
ar_invoice_number_example
   
data_center
string
on success
Data Center Attribute.

Sample:
data_center_example
   
id
string
on success
SPM Invoice Line internal identifier

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
   
product
complex
on success

     
billing_category
string
on success
Metered service billing category

Sample:
billing_category_example
     
name
string
on success
Product name

Sample:
name_example
     
part_number
string
on success
Product part number

Sample:
part_number_example
     
product_category
string
on success
Product category

Sample:
product_category_example
     
ucm_rate_card_part_type
string
on success
Rate card part type of Product

Sample:
ucm_rate_card_part_type_example
     
unit_of_measure
string
on success
Unit of Measure

Sample:
unit_of_measure_example
   
time_end
string
on success
Usage end time

Sample:
2013-10-20T19:20:30+01:00
   
time_start
string
on success
Usage start time

Sample:
2013-10-20T19:20:30+01:00
 
organization
complex
on success

   
name
string
on success
Organization name

Sample:
name_example
   
number
float
on success
Organization ID

Sample:
1.2
 
payment_method
string
on success
Payment Method

Sample:
payment_method_example
 
payment_term
complex
on success

   
created_by
string
on success
User that created the Payment term

Sample:
created_by_example
   
description
string
on success
Payment term Description

Sample:
description_example
   
is_active
boolean
on success
Payment term active flag

Sample:
True
   
name
string
on success
Payment Term name

Sample:
name_example
   
time_created
string
on success
Payment term last update date

Sample:
2013-10-20T19:20:30+01:00
   
time_updated
string
on success
Payment term last update date

Sample:
2013-10-20T19:20:30+01:00
   
updated_by
string
on success
User that updated the Payment term

Sample:
updated_by_example
   
value
string
on success
Payment Term value

Sample:
value_example
 
receipt_method
string
on success
Receipt Method of Payment Mode

Sample:
receipt_method_example
 
spm_invoice_number
string
on success
SPM Document Number is an functional identifier for invoice in SPM

Sample:
spm_invoice_number_example
 
status
string
on success
Document Status in SPM which depicts current state of invoice

Sample:
status_example
 
subscription_number
string
on success
Invoice associated subscription plan number.

Sample:
subscription_number_example
 
time_created
string
on success
SPM Invocie creation date

Sample:
2013-10-20T19:20:30+01:00
 
time_invoice_date
string
on success
Invoice Date

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
SPM Invoice updated date

Sample:
2013-10-20T19:20:30+01:00
 
type
string
on success
Document Type in SPM like SPM Invoice,SPM Credit Memo etc.,

Sample:
type_example
 
updated_by
string
on success
User that updated SPM Invoice

Sample:
updated_by_example


Authors

  • Oracle (@oracle)