DeviceFarm / Client / list_offering_transactions

list_offering_transactions#

DeviceFarm.Client.list_offering_transactions(**kwargs)#

Returns a list of all historical purchases, renewals, and system renewal transactions for an AWS account. The list is paginated and ordered by a descending timestamp (most recent transactions are first). The API returns a NotEligible error if the user is not permitted to invoke the operation. If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com.

See also: AWS API Documentation

Request Syntax

response = client.list_offering_transactions(
    nextToken='string'
)
Parameters:

nextToken (string) – An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Return type:

dict

Returns:

Response Syntax

{
    'offeringTransactions': [
        {
            'offeringStatus': {
                'type': 'PURCHASE'|'RENEW'|'SYSTEM',
                'offering': {
                    'id': 'string',
                    'description': 'string',
                    'type': 'RECURRING',
                    'platform': 'ANDROID'|'IOS',
                    'recurringCharges': [
                        {
                            'cost': {
                                'amount': 123.0,
                                'currencyCode': 'USD'
                            },
                            'frequency': 'MONTHLY'
                        },
                    ]
                },
                'quantity': 123,
                'effectiveOn': datetime(2015, 1, 1)
            },
            'transactionId': 'string',
            'offeringPromotionId': 'string',
            'createdOn': datetime(2015, 1, 1),
            'cost': {
                'amount': 123.0,
                'currencyCode': 'USD'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    Returns the transaction log of the specified offerings.

    • offeringTransactions (list) –

      The audit log of subscriptions you have purchased and modified through AWS Device Farm.

      • (dict) –

        Represents the metadata of an offering transaction.

        • offeringStatus (dict) –

          The status of an offering transaction.

          • type (string) –

            The type specified for the offering status.

          • offering (dict) –

            Represents the metadata of an offering status.

            • id (string) –

              The ID that corresponds to a device offering.

            • description (string) –

              A string that describes the offering.

            • type (string) –

              The type of offering (for example, RECURRING) for a device.

            • platform (string) –

              The platform of the device (for example, ANDROID or IOS).

            • recurringCharges (list) –

              Specifies whether there are recurring charges for the offering.

              • (dict) –

                Specifies whether charges for devices are recurring.

                • cost (dict) –

                  The cost of the recurring charge.

                  • amount (float) –

                    The numerical amount of an offering or transaction.

                  • currencyCode (string) –

                    The currency code of a monetary amount. For example, USD means U.S. dollars.

                • frequency (string) –

                  The frequency in which charges recur.

          • quantity (integer) –

            The number of available devices in the offering.

          • effectiveOn (datetime) –

            The date on which the offering is effective.

        • transactionId (string) –

          The transaction ID of the offering transaction.

        • offeringPromotionId (string) –

          The ID that corresponds to a device offering promotion.

        • createdOn (datetime) –

          The date on which an offering transaction was created.

        • cost (dict) –

          The cost of an offering transaction.

          • amount (float) –

            The numerical amount of an offering or transaction.

          • currencyCode (string) –

            The currency code of a monetary amount. For example, USD means U.S. dollars.

    • nextToken (string) –

      An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Exceptions

  • DeviceFarm.Client.exceptions.ArgumentException

  • DeviceFarm.Client.exceptions.NotFoundException

  • DeviceFarm.Client.exceptions.NotEligibleException

  • DeviceFarm.Client.exceptions.LimitExceededException

  • DeviceFarm.Client.exceptions.ServiceAccountException

Examples

The following example returns information about Device Farm offering transactions.

response = client.list_offering_transactions(
    # A dynamically generated value, used for paginating results.
    nextToken='RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE=',
)

print(response)

Expected Output:

{
    'offeringTransactions': [
        {
            'cost': {
                'amount': 0,
                'currencyCode': 'USD',
            },
            'createdOn': datetime(2016, 8, 1, 3, 17, 0, 0, 214, 0),
            'offeringStatus': {
                'type': 'RENEW',
                'effectiveOn': datetime(2016, 9, 1, 0, 0, 0, 3, 245, 0),
                'offering': {
                    'type': 'RECURRING',
                    'description': 'Android Remote Access Unmetered Device Slot',
                    'id': 'D68B3C05-1BA6-4360-BC69-12345EXAMPLE',
                    'platform': 'ANDROID',
                },
                'quantity': 0,
            },
            'transactionId': '03728003-d1ea-4851-abd6-12345EXAMPLE',
        },
        {
            'cost': {
                'amount': 250,
                'currencyCode': 'USD',
            },
            'createdOn': datetime(2016, 8, 1, 3, 17, 0, 0, 214, 0),
            'offeringStatus': {
                'type': 'PURCHASE',
                'effectiveOn': datetime(2016, 8, 1, 3, 17, 0, 0, 214, 0),
                'offering': {
                    'type': 'RECURRING',
                    'description': 'Android Remote Access Unmetered Device Slot',
                    'id': 'D68B3C05-1BA6-4360-BC69-12345EXAMPLE',
                    'platform': 'ANDROID',
                },
                'quantity': 1,
            },
            'transactionId': '56820b6e-06bd-473a-8ff8-12345EXAMPLE',
        },
        {
            'cost': {
                'amount': 175,
                'currencyCode': 'USD',
            },
            'createdOn': datetime(2016, 6, 10, 6, 2, 0, 4, 162, 0),
            'offeringStatus': {
                'type': 'PURCHASE',
                'effectiveOn': datetime(2016, 6, 10, 6, 2, 0, 4, 162, 0),
                'offering': {
                    'type': 'RECURRING',
                    'description': 'Android Unmetered Device Slot',
                    'id': '8980F81C-00D7-469D-8EC6-12345EXAMPLE',
                    'platform': 'ANDROID',
                },
                'quantity': 1,
            },
            'transactionId': '953ae2c6-d760-4a04-9597-12345EXAMPLE',
        },
        {
            'cost': {
                'amount': 8.07,
                'currencyCode': 'USD',
            },
            'createdOn': datetime(2016, 3, 30, 13, 25, 0, 2, 90, 0),
            'offeringStatus': {
                'type': 'PURCHASE',
                'effectiveOn': datetime(2016, 3, 30, 13, 25, 0, 2, 90, 0),
                'offering': {
                    'type': 'RECURRING',
                    'description': 'iOS Unmetered Device Slot',
                    'id': 'A53D4D73-A6F6-4B82-A0B0-12345EXAMPLE',
                    'platform': 'IOS',
                },
                'quantity': 1,
            },
            'transactionId': '2baf9021-ae3e-47f5-ab52-12345EXAMPLE',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}