/AWS1/IF_WA2=>GETREVENUESTATISTICSSUMMARY()¶
About GetRevenueStatisticsSummary¶
Retrieves a summary of monetization revenue for the specified time window. Returns total revenue, revenue by verification tier, total settlements, and total HTTP 402 responses served. This operation is only available for CLOUDFRONT scope. The maximum supported time window is 90 days. When no CurrencyMode filter is provided, results default to REAL. To retrieve test data, include a CurrencyMode filter with the value TEST.
Method Signature¶
METHODS /AWS1/IF_WA2~GETREVENUESTATISTICSSUMMARY
IMPORTING
!IO_TIMEWINDOW TYPE REF TO /AWS1/CL_WA2TIMEWINDOW OPTIONAL
!IV_SCOPE TYPE /AWS1/WA2SCOPE OPTIONAL
!IV_CURRENCY TYPE /AWS1/WA2CURRENCY OPTIONAL
!IT_FILTERS TYPE /AWS1/CL_WA2MONETIZATIONFILTER=>TT_MONETIZATIONFILTERLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wa2gtrevnstatssummrsp
RAISING
/AWS1/CX_WA2WAFINTERNALERROREX
/AWS1/CX_WA2WAFINVALIDOPEX
/AWS1/CX_WA2WAFINVALIDPARAMEX
/AWS1/CX_WA2WAFNONEXENTITEMEX
/AWS1/CX_WA2CLIENTEXC
/AWS1/CX_WA2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_timewindow TYPE REF TO /AWS1/CL_WA2TIMEWINDOW /AWS1/CL_WA2TIMEWINDOW¶
The time range for the revenue summary query. Specify start and end timestamps.
iv_scope TYPE /AWS1/WA2SCOPE /AWS1/WA2SCOPE¶
Specifies whether this is for a Amazon CloudFront distribution (
CLOUDFRONT) or for a regional application (REGIONAL). AI bot monetization is only available forCLOUDFRONTscope.
iv_currency TYPE /AWS1/WA2CURRENCY /AWS1/WA2CURRENCY¶
The currency for the revenue amounts in the response. Currently only
USDCis supported.
Optional arguments:¶
it_filters TYPE /AWS1/CL_WA2MONETIZATIONFILTER=>TT_MONETIZATIONFILTERLIST TT_MONETIZATIONFILTERLIST¶
Optional filters to narrow the results. You can filter by source name, category, organization, intent, verified status, content path, web ACL ARN, or currency mode.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wa2gtrevnstatssummrsp /AWS1/CL_WA2GTREVNSTATSSUMMRSP¶
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->getrevenuestatisticssummary(
io_timewindow = new /aws1/cl_wa2timewindow(
iv_endtime = '20150101000000.0000000'
iv_starttime = '20150101000000.0000000'
)
it_filters = VALUE /aws1/cl_wa2monetizationfilter=>tt_monetizationfilterlist(
(
new /aws1/cl_wa2monetizationfilter(
it_values = VALUE /aws1/cl_wa2monetizationfltv00=>tt_monetizationfiltervaluelist(
( new /aws1/cl_wa2monetizationfltv00( |string| ) )
)
iv_name = |string|
)
)
)
iv_currency = |string|
iv_scope = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_revenuebreakdown = lo_result->get_revenuebreakdown( ).
IF lo_revenuebreakdown IS NOT INITIAL.
lv_monetizationamountvalue = lo_revenuebreakdown->get_totalamount( ).
lv_monetizationamountvalue = lo_revenuebreakdown->get_verifiedamount( ).
lv_monetizationamountvalue = lo_revenuebreakdown->get_unverifiedamount( ).
lv_currency = lo_revenuebreakdown->get_currency( ).
lv_requestcount = lo_revenuebreakdown->get_totalsettled( ).
lv_requestcount = lo_revenuebreakdown->get_totalmonetizeserved( ).
ENDIF.
ENDIF.