/AWS1/IF_PPM=>ASSOCWHATSAPPBUSINESSACCOUNT()¶
About AssociateWhatsAppBusinessAccount¶
This is only used through the Amazon Web Services console during sign-up to associate your WhatsApp Business Account to your Amazon Web Services account.
Method Signature¶
METHODS /AWS1/IF_PPM~ASSOCWHATSAPPBUSINESSACCOUNT
IMPORTING
!IO_SIGNUPCALLBACK TYPE REF TO /AWS1/CL_PPMWHATSAPPSIGNUPCA00 OPTIONAL
!IO_SETUPFINALIZATION TYPE REF TO /AWS1/CL_PPMWHATSAPPSETUPFIN00 OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ppmascwhatsappbusin01
RAISING
/AWS1/CX_PPMACCESSDENIEDEX
/AWS1/CX_PPMVALIDATIONEX
/AWS1/CX_PPMDEPENDENCYEX
/AWS1/CX_PPMINVALIDPARAMSEX
/AWS1/CX_PPMLIMITEXCEEDEDEX
/AWS1/CX_PPMTHROTTLEDREQUESTEX
/AWS1/CX_PPMCLIENTEXC
/AWS1/CX_PPMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
io_signupcallback TYPE REF TO /AWS1/CL_PPMWHATSAPPSIGNUPCA00 /AWS1/CL_PPMWHATSAPPSIGNUPCA00¶
Contains the callback access token.
io_setupfinalization TYPE REF TO /AWS1/CL_PPMWHATSAPPSETUPFIN00 /AWS1/CL_PPMWHATSAPPSETUPFIN00¶
A JSON object that contains the phone numbers and WhatsApp Business Account to link to your account.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ppmascwhatsappbusin01 /AWS1/CL_PPMASCWHATSAPPBUSIN01¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->assocwhatsappbusinessaccount(
io_setupfinalization = new /aws1/cl_ppmwhatsappsetupfin00(
io_waba = new /aws1/cl_ppmwabasetupfinaliz00(
it_eventdestinations = VALUE /aws1/cl_ppmwhatsappbusiness00=>tt_whatsappbusinessacctevtdsts(
(
new /aws1/cl_ppmwhatsappbusiness00(
iv_eventdestinationarn = |string|
iv_rolearn = |string|
)
)
)
it_tags = VALUE /aws1/cl_ppmtag=>tt_taglist(
(
new /aws1/cl_ppmtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_id = |string|
)
it_phonenumbers = VALUE /aws1/cl_ppmwabaphonenosetup00=>tt_wabaphonenosetupfinalizat00(
(
new /aws1/cl_ppmwabaphonenosetup00(
it_tags = VALUE /aws1/cl_ppmtag=>tt_taglist(
(
new /aws1/cl_ppmtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_datalocalizationregion = |string|
iv_id = |string|
iv_twofactorpin = |string|
)
)
)
iv_associateinprogresstoken = |string|
iv_phonenumberparent = |string|
)
io_signupcallback = new /aws1/cl_ppmwhatsappsignupca00(
iv_accesstoken = |string|
iv_callbackurl = |string|
)
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_whatsappsignupcallbackr = lo_result->get_signupcallbackresult( ).
IF lo_whatsappsignupcallbackr IS NOT INITIAL.
lv_associateinprogresstoke = lo_whatsappsignupcallbackr->get_associateinprogresstoken( ).
LOOP AT lo_whatsappsignupcallbackr->get_lnkacctswithincomplsetup( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_whatsappbusinessaccount = lo_value->get_accountname( ).
lv_registrationstatus = lo_value->get_registrationstatus( ).
LOOP AT lo_value->get_unregedwhatsappphonenums( ) into lo_row_1.
lo_row_2 = lo_row_1.
IF lo_row_2 IS NOT INITIAL.
lv_linkedwhatsappphonenumb = lo_row_2->get_arn( ).
lv_phonenumber = lo_row_2->get_phonenumber( ).
lv_whatsappphonenumberid = lo_row_2->get_phonenumberid( ).
lv_whatsappphonenumber = lo_row_2->get_metaphonenumberid( ).
lv_whatsappphonenumbername = lo_row_2->get_displayphonenumbername( ).
lv_whatsappdisplayphonenum = lo_row_2->get_displayphonenumber( ).
lv_whatsappphonenumberqual = lo_row_2->get_qualityrating( ).
lv_isocountrycode = lo_row_2->get_datalocalizationregion( ).
ENDIF.
ENDLOOP.
lv_linkedwhatsappbusinessa = lo_value->get_wabaid( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_integer = lo_result->get_statuscode( ).
ENDIF.