/AWS1/IF_MPI=>GETOFFERTERMS()¶
About GetOfferTerms¶
Returns the terms attached to an offer, such as pricing terms (usage-based, contract, BYOL, free trial), legal terms, payment schedules, validity terms, support terms, and renewal terms.
Method Signature¶
METHODS /AWS1/IF_MPI~GETOFFERTERMS
IMPORTING
!IV_OFFERID TYPE /AWS1/MPIOFFERID OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/MPIINTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/MPINEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpigetoffertermsout
RAISING
/AWS1/CX_MPIACCESSDENIEDEX
/AWS1/CX_MPIINTERNALSERVEREX
/AWS1/CX_MPITHROTTLINGEX
/AWS1/CX_MPIVLDTNEXCEPTION
/AWS1/CX_MPIRESOURCENOTFOUNDEX
/AWS1/CX_MPICLIENTEXC
/AWS1/CX_MPISERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_offerid TYPE /AWS1/MPIOFFERID /AWS1/MPIOFFERID¶
The unique identifier of the offer whose terms to retrieve.
Optional arguments:¶
iv_maxresults TYPE /AWS1/MPIINTEGER /AWS1/MPIINTEGER¶
The maximum number of results that are returned per call. You can use
nextTokento get more results.
iv_nexttoken TYPE /AWS1/MPINEXTTOKEN /AWS1/MPINEXTTOKEN¶
If
nextTokenis returned, there are more results available. Make the call again using the returned token to retrieve the next page.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mpigetoffertermsout /AWS1/CL_MPIGETOFFERTERMSOUT¶
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->getofferterms(
iv_maxresults = 123
iv_nexttoken = |string|
iv_offerid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_offerterms( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_byolpricingterm = lo_row_1->get_byolpricingterm( ).
IF lo_byolpricingterm IS NOT INITIAL.
lv_termid = lo_byolpricingterm->get_id( ).
lv_termtype = lo_byolpricingterm->get_type( ).
ENDIF.
lo_configurableupfrontpric = lo_row_1->get_cnfgrblupfrntpricingterm( ).
IF lo_configurableupfrontpric IS NOT INITIAL.
lv_termid = lo_configurableupfrontpric->get_id( ).
lv_termtype = lo_configurableupfrontpric->get_type( ).
lv_currencycode = lo_configurableupfrontpric->get_currencycode( ).
LOOP AT lo_configurableupfrontpric->get_ratecards( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lo_selector = lo_row_3->get_selector( ).
IF lo_selector IS NOT INITIAL.
lv_selectortype = lo_selector->get_type( ).
lv_boundedstring = lo_selector->get_value( ).
ENDIF.
lo_constraints = lo_row_3->get_constraints( ).
IF lo_constraints IS NOT INITIAL.
lv_ratecardconstrainttype = lo_constraints->get_multipledimelection( ).
lv_ratecardconstrainttype = lo_constraints->get_quantityconfiguration( ).
ENDIF.
LOOP AT lo_row_3->get_ratecard( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_boundedstring = lo_row_5->get_dimensionkey( ).
lv_boundedstring = lo_row_5->get_displayname( ).
lv_boundedstring = lo_row_5->get_description( ).
LOOP AT lo_row_5->get_dimensionlabels( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_dimensionlabeltype = lo_row_7->get_labeltype( ).
lv_boundedstring = lo_row_7->get_labelvalue( ).
lv_boundedstring = lo_row_7->get_displayname( ).
ENDIF.
ENDLOOP.
lv_boundedstring = lo_row_5->get_unit( ).
lv_boundedstring = lo_row_5->get_price( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
lo_fixedupfrontpricingterm = lo_row_1->get_fixedupfrontpricingterm( ).
IF lo_fixedupfrontpricingterm IS NOT INITIAL.
lv_termid = lo_fixedupfrontpricingterm->get_id( ).
lv_termtype = lo_fixedupfrontpricingterm->get_type( ).
lv_currencycode = lo_fixedupfrontpricingterm->get_currencycode( ).
lv_boundedstring = lo_fixedupfrontpricingterm->get_duration( ).
lv_boundedstring = lo_fixedupfrontpricingterm->get_price( ).
LOOP AT lo_fixedupfrontpricingterm->get_grants( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_boundedstring = lo_row_9->get_dimensionkey( ).
lv_boundedstring = lo_row_9->get_displayname( ).
lv_boundedstring = lo_row_9->get_description( ).
LOOP AT lo_row_9->get_dimensionlabels( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_dimensionlabeltype = lo_row_7->get_labeltype( ).
lv_boundedstring = lo_row_7->get_labelvalue( ).
lv_boundedstring = lo_row_7->get_displayname( ).
ENDIF.
ENDLOOP.
lv_boundedstring = lo_row_9->get_unit( ).
lv_integer = lo_row_9->get_maxquantity( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_freetrialpricingterm = lo_row_1->get_freetrialpricingterm( ).
IF lo_freetrialpricingterm IS NOT INITIAL.
lv_termid = lo_freetrialpricingterm->get_id( ).
lv_termtype = lo_freetrialpricingterm->get_type( ).
lv_boundedstring = lo_freetrialpricingterm->get_duration( ).
LOOP AT lo_freetrialpricingterm->get_grants( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_boundedstring = lo_row_9->get_dimensionkey( ).
lv_boundedstring = lo_row_9->get_displayname( ).
lv_boundedstring = lo_row_9->get_description( ).
LOOP AT lo_row_9->get_dimensionlabels( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_dimensionlabeltype = lo_row_7->get_labeltype( ).
lv_boundedstring = lo_row_7->get_labelvalue( ).
lv_boundedstring = lo_row_7->get_displayname( ).
ENDIF.
ENDLOOP.
lv_boundedstring = lo_row_9->get_unit( ).
lv_integer = lo_row_9->get_maxquantity( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_legalterm = lo_row_1->get_legalterm( ).
IF lo_legalterm IS NOT INITIAL.
lv_termid = lo_legalterm->get_id( ).
lv_termtype = lo_legalterm->get_type( ).
LOOP AT lo_legalterm->get_documents( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_legaldocumenttype = lo_row_11->get_type( ).
lv_url = lo_row_11->get_url( ).
lv_string = lo_row_11->get_version( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_paymentscheduleterm = lo_row_1->get_paymentscheduleterm( ).
IF lo_paymentscheduleterm IS NOT INITIAL.
lv_termid = lo_paymentscheduleterm->get_id( ).
lv_termtype = lo_paymentscheduleterm->get_type( ).
lv_currencycode = lo_paymentscheduleterm->get_currencycode( ).
LOOP AT lo_paymentscheduleterm->get_schedule( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_timestamp = lo_row_13->get_chargedate( ).
lv_boundedstring = lo_row_13->get_chargeamount( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_recurringpaymentterm = lo_row_1->get_recurringpaymentterm( ).
IF lo_recurringpaymentterm IS NOT INITIAL.
lv_termid = lo_recurringpaymentterm->get_id( ).
lv_termtype = lo_recurringpaymentterm->get_type( ).
lv_currencycode = lo_recurringpaymentterm->get_currencycode( ).
lv_billingperiodtype = lo_recurringpaymentterm->get_billingperiod( ).
lv_boundedstring = lo_recurringpaymentterm->get_price( ).
ENDIF.
lo_renewalterm = lo_row_1->get_renewalterm( ).
IF lo_renewalterm IS NOT INITIAL.
lv_termid = lo_renewalterm->get_id( ).
lv_termtype = lo_renewalterm->get_type( ).
ENDIF.
lo_supportterm = lo_row_1->get_supportterm( ).
IF lo_supportterm IS NOT INITIAL.
lv_termid = lo_supportterm->get_id( ).
lv_termtype = lo_supportterm->get_type( ).
lv_boundedstring = lo_supportterm->get_refundpolicy( ).
ENDIF.
lo_usagebasedpricingterm = lo_row_1->get_usagebasedpricingterm( ).
IF lo_usagebasedpricingterm IS NOT INITIAL.
lv_termid = lo_usagebasedpricingterm->get_id( ).
lv_termtype = lo_usagebasedpricingterm->get_type( ).
lv_currencycode = lo_usagebasedpricingterm->get_currencycode( ).
LOOP AT lo_usagebasedpricingterm->get_ratecards( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
LOOP AT lo_row_15->get_ratecard( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_boundedstring = lo_row_5->get_dimensionkey( ).
lv_boundedstring = lo_row_5->get_displayname( ).
lv_boundedstring = lo_row_5->get_description( ).
LOOP AT lo_row_5->get_dimensionlabels( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_dimensionlabeltype = lo_row_7->get_labeltype( ).
lv_boundedstring = lo_row_7->get_labelvalue( ).
lv_boundedstring = lo_row_7->get_displayname( ).
ENDIF.
ENDLOOP.
lv_boundedstring = lo_row_5->get_unit( ).
lv_boundedstring = lo_row_5->get_price( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
lo_validityterm = lo_row_1->get_validityterm( ).
IF lo_validityterm IS NOT INITIAL.
lv_termid = lo_validityterm->get_id( ).
lv_termtype = lo_validityterm->get_type( ).
lv_boundedstring = lo_validityterm->get_agreementduration( ).
lv_timestamp = lo_validityterm->get_agreementenddate( ).
lv_timestamp = lo_validityterm->get_agreementstartdate( ).
ENDIF.
lo_variablepaymentterm = lo_row_1->get_variablepaymentterm( ).
IF lo_variablepaymentterm IS NOT INITIAL.
lv_termid = lo_variablepaymentterm->get_id( ).
lv_termtype = lo_variablepaymentterm->get_type( ).
lv_currencycode = lo_variablepaymentterm->get_currencycode( ).
lv_boundedstring = lo_variablepaymentterm->get_maxtotalchargeamount( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.
GetOfferTerms for Usage-based ML Model offer¶
GetOfferTerms for Usage-based ML Model offer
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleUsageBasedId| ) .
GetOfferTerms for BYOL offer¶
GetOfferTerms for BYOL offer
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleByolId| ) .
GetOfferTerms for configurable upfront pricing¶
GetOfferTerms for configurable upfront pricing
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleConfigUpfrontId| ) .
GetOfferTerms for free trial offer¶
GetOfferTerms for free trial offer
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleFreeTrialId| ) .
GetOfferTerms for recurring payment¶
GetOfferTerms for recurring payment
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleRecurringId| ) .
GetOfferTerms for variable payment¶
GetOfferTerms for variable payment
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleVariableId| ) .
GetOfferTerms for renewal term¶
GetOfferTerms for renewal term
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleRenewalId| ) .
GetOfferTerms for support term¶
GetOfferTerms for support term
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleSupportId| ) .
GetOfferTerms for validity term with dates¶
GetOfferTerms for validity term with dates
DATA(lo_result) = lo_client->getofferterms( iv_offerid = |offer-sampleValidityId| ) .