Source:
<code>public void setScoreShippingRateInput() { final ShippingRateInputType shippingRateInputType = CartScore.of(); final Project project = client().executeBlocking(ProjectGet.of()); final Project updatedProjectCartValue = client().executeBlocking(ProjectUpdateCommand.of(project, SetShippingRateInputType.of(shippingRateInputType))); assertThat(updatedProjectCartValue.getShippingRateInputType().getType()).isEqualTo(shippingRateInputType.getType()); final CartDraft draft = CartDraft.of(EUR) .withTaxMode(TaxMode.EXTERNAL) .withShippingAddress(Address.of(DE)); withCartDraft(client(), draft, (Cart cart) -> { final String taxRateName = "special tax"; final double taxRate = 0.20; final ExternalTaxRateDraft externalTaxRate = ExternalTaxRateDraftBuilder.ofAmount(taxRate, taxRateName, DE).build(); final ShippingRate shippingRate = ShippingRate.of(EURO_10, null, Arrays.asList( io.sphere.sdk.shippingmethods.CartScore.ofPriceFunction(PriceFunction.of(EUR.getCurrencyCode(), "(50 * x) + 750"), 0L), io.sphere.sdk.shippingmethods.CartScore.ofScore(EURO_20, 1L), io.sphere.sdk.shippingmethods.CartScore.ofScore(EURO_20, 2L) )); final SetCustomShippingMethod action = SetCustomShippingMethod.ofExternalTaxCalculation("name", shippingRate, externalTaxRate); final Cart cartWithShippingMethod = client().executeBlocking(CartUpdateCommand.of(cart, action)); final ShippingRateInput shippingRateInput = ScoreShippingRateInput.of(11L); <START> SphereJsonUtils.toJsonString(ScoreShippingRateInput.of(11L)); <END> final Cart cartWithShippingMethodWithScore = client().executeBlocking(CartUpdateCommand.of(cartWithShippingMethod, SetShippingRateInput.of(shippingRateInput))); return cartWithShippingMethodWithScore; }); }</code><technical_language>this line is a debugging left remove it</technical_language>

Target:
public void setScoreShippingRateInput() { final ShippingRateInputTypeDraft shippingRateInputType = CartScoreDraftBuilder.of().build(); final Project project = client().executeBlocking(ProjectGet.of()); final Project updatedProjectCartValue = client().executeBlocking(ProjectUpdateCommand.of(project, SetShippingRateInputType.of(shippingRateInputType))); assertThat(updatedProjectCartValue.getShippingRateInputType().getType()).isEqualTo("CartScore"); final CartDraft draft = CartDraft.of(EUR) .withTaxMode(TaxMode.EXTERNAL) .withShippingAddress(Address.of(DE)); withCartDraft(client(), draft, (Cart cart) -> { final String taxRateName = "special tax"; final double taxRate = 0.20; final ExternalTaxRateDraft externalTaxRate = ExternalTaxRateDraftBuilder.ofAmount(taxRate, taxRateName, DE).build(); final ShippingRate shippingRate = ShippingRate.of(EURO_10, null, Arrays.asList( io.sphere.sdk.shippingmethods.CartScoreBuilder.of( 0L, PriceFunctionBuilder.of(EUR.getCurrencyCode(), "(50 * x) + 750").build()).build(), io.sphere.sdk.shippingmethods.CartScoreBuilder.of(1L, EURO_20).build(), io.sphere.sdk.shippingmethods.CartScoreBuilder.of(2L, EURO_20).build() )); final SetCustomShippingMethod action = SetCustomShippingMethod.ofExternalTaxCalculation("name", shippingRate, externalTaxRate); final Cart cartWithShippingMethod = client().executeBlocking(CartUpdateCommand.of(cart, action)); final ShippingRateInputDraft shippingRateInput = ScoreShippingRateInputDraftBuilder.of(11L).build(); final Cart cartWithShippingMethodWithScore = client().executeBlocking(CartUpdateCommand.of(cartWithShippingMethod, SetShippingRateInput.of(shippingRateInput))); return cartWithShippingMethodWithScore; }); }