/AWS1/IF_BDC=>CREATEPAYMENTINSTRUMENT()¶
About CreatePaymentInstrument¶
Create a new payment instrument for a connector.
Method Signature¶
METHODS /AWS1/IF_BDC~CREATEPAYMENTINSTRUMENT
IMPORTING
!IV_USERID TYPE /AWS1/BDCUSERID OPTIONAL
!IV_AGENTNAME TYPE /AWS1/BDCPAYMENTAGENTNAME OPTIONAL
!IV_PAYMENTMANAGERARN TYPE /AWS1/BDCPAYMENTMANAGERARN OPTIONAL
!IV_PAYMENTCONNECTORID TYPE /AWS1/BDCPAYMENTCONNECTORID OPTIONAL
!IV_PAYMENTINSTRUMENTTYPE TYPE /AWS1/BDCPAYMENTINSTRUMENTTYPE OPTIONAL
!IO_PAYMENTINSTRUMENTDETAILS TYPE REF TO /AWS1/CL_BDCPMNTINSTRMDETAILS OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/BDCCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdccrepmntinstrmrsp
RAISING
/AWS1/CX_BDCACCESSDENIEDEX
/AWS1/CX_BDCCONFLICTEXCEPTION
/AWS1/CX_BDCINTERNALSERVEREX
/AWS1/CX_BDCSERVICEQUOTAEXCDEX
/AWS1/CX_BDCTHROTTLINGEX
/AWS1/CX_BDCVALIDATIONEX
/AWS1/CX_BDCCLIENTEXC
/AWS1/CX_BDCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_paymentmanagerarn TYPE /AWS1/BDCPAYMENTMANAGERARN /AWS1/BDCPAYMENTMANAGERARN¶
The ARN of the payment manager that owns this payment instrument.
iv_paymentconnectorid TYPE /AWS1/BDCPAYMENTCONNECTORID /AWS1/BDCPAYMENTCONNECTORID¶
The ID of the payment connector to use for this instrument.
iv_paymentinstrumenttype TYPE /AWS1/BDCPAYMENTINSTRUMENTTYPE /AWS1/BDCPAYMENTINSTRUMENTTYPE¶
The type of payment instrument being created.
io_paymentinstrumentdetails TYPE REF TO /AWS1/CL_BDCPMNTINSTRMDETAILS /AWS1/CL_BDCPMNTINSTRMDETAILS¶
The details of the payment instrument.
Optional arguments:¶
iv_userid TYPE /AWS1/BDCUSERID /AWS1/BDCUSERID¶
The user ID associated with this payment instrument.
iv_agentname TYPE /AWS1/BDCPAYMENTAGENTNAME /AWS1/BDCPAYMENTAGENTNAME¶
The agent name associated with this request, used for observability.
iv_clienttoken TYPE /AWS1/BDCCLIENTTOKEN /AWS1/BDCCLIENTTOKEN¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdccrepmntinstrmrsp /AWS1/CL_BDCCREPMNTINSTRMRSP¶
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->createpaymentinstrument(
io_paymentinstrumentdetails = new /aws1/cl_bdcpmntinstrmdetails(
io_embeddedcryptowallet = new /aws1/cl_bdcembeddedcryptowllt(
it_linkedaccounts = VALUE /aws1/cl_bdclinkedaccount=>tt_linkedaccountlist(
(
new /aws1/cl_bdclinkedaccount(
io_developerjwt = new /aws1/cl_bdclnkaccdeveloperjwt(
iv_kid = |string|
iv_sub = |string|
)
io_email = new /aws1/cl_bdclinkedaccountemail( |string| )
io_oauth2 = new /aws1/cl_bdclinkedacctoauth2(
io_apple = new /aws1/cl_bdcoauth2authntctn(
iv_emailaddress = |string|
iv_name = |string|
iv_sub = |string|
iv_username = |string|
)
io_github = new /aws1/cl_bdcoauth2authntctn(
iv_emailaddress = |string|
iv_name = |string|
iv_sub = |string|
iv_username = |string|
)
io_google = new /aws1/cl_bdcoauth2authntctn(
iv_emailaddress = |string|
iv_name = |string|
iv_sub = |string|
iv_username = |string|
)
io_telegram = new /aws1/cl_bdcoauth2authntctn(
iv_emailaddress = |string|
iv_name = |string|
iv_sub = |string|
iv_username = |string|
)
io_x = new /aws1/cl_bdcoauth2authntctn(
iv_emailaddress = |string|
iv_name = |string|
iv_sub = |string|
iv_username = |string|
)
)
io_sms = new /aws1/cl_bdclinkedaccountsms( |string| )
)
)
)
iv_network = |string|
iv_redirecturl = |string|
iv_walletaddress = |string|
)
)
iv_agentname = |string|
iv_clienttoken = |string|
iv_paymentconnectorid = |string|
iv_paymentinstrumenttype = |string|
iv_paymentmanagerarn = |string|
iv_userid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_paymentinstrument = lo_result->get_paymentinstrument( ).
IF lo_paymentinstrument IS NOT INITIAL.
lv_paymentinstrumentid = lo_paymentinstrument->get_paymentinstrumentid( ).
lv_paymentmanagerarn = lo_paymentinstrument->get_paymentmanagerarn( ).
lv_paymentconnectorid = lo_paymentinstrument->get_paymentconnectorid( ).
lv_userid = lo_paymentinstrument->get_userid( ).
lv_paymentinstrumenttype = lo_paymentinstrument->get_paymentinstrumenttype( ).
lo_paymentinstrumentdetail = lo_paymentinstrument->get_paymentinstrumentdetails( ).
IF lo_paymentinstrumentdetail IS NOT INITIAL.
lo_embeddedcryptowallet = lo_paymentinstrumentdetail->get_embeddedcryptowallet( ).
IF lo_embeddedcryptowallet IS NOT INITIAL.
lv_cryptowalletnetwork = lo_embeddedcryptowallet->get_network( ).
LOOP AT lo_embeddedcryptowallet->get_linkedaccounts( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_linkedaccountemail = lo_row_1->get_email( ).
IF lo_linkedaccountemail IS NOT INITIAL.
lv_email = lo_linkedaccountemail->get_emailaddress( ).
ENDIF.
lo_linkedaccountsms = lo_row_1->get_sms( ).
IF lo_linkedaccountsms IS NOT INITIAL.
lv_phonenumber = lo_linkedaccountsms->get_phonenumber( ).
ENDIF.
lo_linkedaccountdeveloperj = lo_row_1->get_developerjwt( ).
IF lo_linkedaccountdeveloperj IS NOT INITIAL.
lv_jwtkeyid = lo_linkedaccountdeveloperj->get_kid( ).
lv_string = lo_linkedaccountdeveloperj->get_sub( ).
ENDIF.
lo_linkedaccountoauth2 = lo_row_1->get_oauth2( ).
IF lo_linkedaccountoauth2 IS NOT INITIAL.
lo_oauth2authentication = lo_linkedaccountoauth2->get_google( ).
IF lo_oauth2authentication IS NOT INITIAL.
lv_string = lo_oauth2authentication->get_sub( ).
lv_email = lo_oauth2authentication->get_emailaddress( ).
lv_string = lo_oauth2authentication->get_name( ).
lv_string = lo_oauth2authentication->get_username( ).
ENDIF.
lo_oauth2authentication = lo_linkedaccountoauth2->get_apple( ).
IF lo_oauth2authentication IS NOT INITIAL.
lv_string = lo_oauth2authentication->get_sub( ).
lv_email = lo_oauth2authentication->get_emailaddress( ).
lv_string = lo_oauth2authentication->get_name( ).
lv_string = lo_oauth2authentication->get_username( ).
ENDIF.
lo_oauth2authentication = lo_linkedaccountoauth2->get_x( ).
IF lo_oauth2authentication IS NOT INITIAL.
lv_string = lo_oauth2authentication->get_sub( ).
lv_email = lo_oauth2authentication->get_emailaddress( ).
lv_string = lo_oauth2authentication->get_name( ).
lv_string = lo_oauth2authentication->get_username( ).
ENDIF.
lo_oauth2authentication = lo_linkedaccountoauth2->get_telegram( ).
IF lo_oauth2authentication IS NOT INITIAL.
lv_string = lo_oauth2authentication->get_sub( ).
lv_email = lo_oauth2authentication->get_emailaddress( ).
lv_string = lo_oauth2authentication->get_name( ).
lv_string = lo_oauth2authentication->get_username( ).
ENDIF.
lo_oauth2authentication = lo_linkedaccountoauth2->get_github( ).
IF lo_oauth2authentication IS NOT INITIAL.
lv_string = lo_oauth2authentication->get_sub( ).
lv_email = lo_oauth2authentication->get_emailaddress( ).
lv_string = lo_oauth2authentication->get_name( ).
lv_string = lo_oauth2authentication->get_username( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
lv_string = lo_embeddedcryptowallet->get_walletaddress( ).
lv_string = lo_embeddedcryptowallet->get_redirecturl( ).
ENDIF.
ENDIF.
lv_datetimestamp = lo_paymentinstrument->get_createdat( ).
lv_paymentinstrumentstatus = lo_paymentinstrument->get_status( ).
lv_datetimestamp = lo_paymentinstrument->get_updatedat( ).
ENDIF.
ENDIF.