/AWS1/IF_PP2=>UPDATEPHONENUMBER()¶
About UpdatePhoneNumber¶
Updates the configuration of an existing origination phone number. You can update the opt-out list, enable or disable two-way messaging, change the TwoWayChannelArn, enable or disable self-managed opt-outs, and enable or disable deletion protection.
If the origination phone number is associated with a pool, an error is returned.
Method Signature¶
METHODS /AWS1/IF_PP2~UPDATEPHONENUMBER
IMPORTING
!IV_PHONENUMBERID TYPE /AWS1/PP2PHONENUMBERIDORARN OPTIONAL
!IV_TWOWAYENABLED TYPE /AWS1/PP2BOOLEAN OPTIONAL
!IV_TWOWAYCHANNELARN TYPE /AWS1/PP2TWOWAYCHANNELARN OPTIONAL
!IV_TWOWAYCHANNELROLE TYPE /AWS1/PP2IAMROLEARN OPTIONAL
!IV_SELFMANAGEDOPTOUTSENABLED TYPE /AWS1/PP2BOOLEAN OPTIONAL
!IV_OPTOUTLISTNAME TYPE /AWS1/PP2OPTOUTLISTNAMEORARN OPTIONAL
!IV_INTERNATIONALSENDINGENBD TYPE /AWS1/PP2BOOLEAN OPTIONAL
!IV_DELETIONPROTECTIONENABLED TYPE /AWS1/PP2BOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pp2updphonenumberrslt
RAISING
/AWS1/CX_PP2ACCESSDENIEDEX
/AWS1/CX_PP2CONFLICTEXCEPTION
/AWS1/CX_PP2INTERNALSERVEREX
/AWS1/CX_PP2RESOURCENOTFOUNDEX
/AWS1/CX_PP2THROTTLINGEX
/AWS1/CX_PP2VALIDATIONEX
/AWS1/CX_PP2CLIENTEXC
/AWS1/CX_PP2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_phonenumberid TYPE /AWS1/PP2PHONENUMBERIDORARN /AWS1/PP2PHONENUMBERIDORARN¶
The unique identifier of the phone number. Valid values for this field can be either the PhoneNumberId or PhoneNumberArn.
If you are using a shared End User MessagingSMS resource then you must use the full Amazon Resource Name(ARN).
Optional arguments:¶
iv_twowayenabled TYPE /AWS1/PP2BOOLEAN /AWS1/PP2BOOLEAN¶
By default this is set to false. When set to true you can receive incoming text messages from your end recipients.
iv_twowaychannelarn TYPE /AWS1/PP2TWOWAYCHANNELARN /AWS1/PP2TWOWAYCHANNELARN¶
The Amazon Resource Name (ARN) of the two way channel.
iv_twowaychannelrole TYPE /AWS1/PP2IAMROLEARN /AWS1/PP2IAMROLEARN¶
An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
iv_selfmanagedoptoutsenabled TYPE /AWS1/PP2BOOLEAN /AWS1/PP2BOOLEAN¶
By default this is set to false. When set to false and an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, End User MessagingSMS automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.
iv_optoutlistname TYPE /AWS1/PP2OPTOUTLISTNAMEORARN /AWS1/PP2OPTOUTLISTNAMEORARN¶
The OptOutList to add the phone number to. You can use either the opt out list name or the opt out list ARN.
iv_internationalsendingenbd TYPE /AWS1/PP2BOOLEAN /AWS1/PP2BOOLEAN¶
By default this is set to false. When set to true the international sending of phone number is Enabled.
iv_deletionprotectionenabled TYPE /AWS1/PP2BOOLEAN /AWS1/PP2BOOLEAN¶
By default this is set to false. When set to true the phone number can't be deleted.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_pp2updphonenumberrslt /AWS1/CL_PP2UPDPHONENUMBERRSLT¶
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->updatephonenumber(
iv_deletionprotectionenabled = ABAP_TRUE
iv_internationalsendingenbd = ABAP_TRUE
iv_optoutlistname = |string|
iv_phonenumberid = |string|
iv_selfmanagedoptoutsenabled = ABAP_TRUE
iv_twowaychannelarn = |string|
iv_twowaychannelrole = |string|
iv_twowayenabled = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_phonenumberarn( ).
lv_string = lo_result->get_phonenumberid( ).
lv_phonenumber = lo_result->get_phonenumber( ).
lv_numberstatus = lo_result->get_status( ).
lv_isocountrycode = lo_result->get_isocountrycode( ).
lv_messagetype = lo_result->get_messagetype( ).
LOOP AT lo_result->get_numbercapabilities( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_numbercapability = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_numbertype = lo_result->get_numbertype( ).
lv_string = lo_result->get_monthlyleasingprice( ).
lv_primitiveboolean = lo_result->get_twowayenabled( ).
lv_twowaychannelarn = lo_result->get_twowaychannelarn( ).
lv_iamrolearn = lo_result->get_twowaychannelrole( ).
lv_primitiveboolean = lo_result->get_selfmanagedoptoutsenbd( ).
lv_optoutlistname = lo_result->get_optoutlistname( ).
lv_primitiveboolean = lo_result->get_internationalsendingenbd( ).
lv_primitiveboolean = lo_result->get_deletionprotectionenbd( ).
lv_string = lo_result->get_registrationid( ).
lv_timestamp = lo_result->get_createdtimestamp( ).
ENDIF.