|
getShippingOptionsAndRatesFromExternalService (Integer numberOfUniqueItems) { final Integer SuccessfulHttpRequest = 200; ShippingOptionsAndRatesFromExternalService[] shippingOptions = Http http = new Http(); HttpRequest request = new HttpRequest(); // To access the service below, you may need to add request.setEndpoint( request.setMethod('GET'); HttpResponse response = http.send(request); |
このサービスを使用したいくつかのサンプル Apex ファイルが Salesforce Commerce CLI を使用して、組織に展開されています。自分の組織でいずれかのサンプルを使用している場合は、サービスが廃止されるとサンプルが動作しなくなるため、できるだけ早くそれらを置き換えてください。
このサービスへのすべての参照を削除して、代わりに外部サービスの応答を静的応答としてモックアップを作成する最新のサンプルを取得するには、次のリポジトリに移動し、最新の変更を取得してください。
https://github.com/forcedotcom/commerce-on-lightning/
いずれかのサンプルを展開組織または本番組織に展開している場合は、更新済みのサンプルを再展開してください。また、これらのいずれかのサンプルを独自のクラスの基盤として使用していた場合は、クラスをリファクタリングして、廃止された Heroku サービスへのすべての参照を削除してください。
外部サービスを有効にする場合は、サンプルクラスを更新し、Heroku サービスの独自のコピーを展開します。Heroku サービスは、この公開リポジトリから展開、変更、更新できるようになりました。
https://github.com/forcedotcom/commerce-heroku-sample-response
1.Apex クラスを更新します。
2.サンプル参照 (https://example.com) を Heroku URL で置換します。
3.[設定] > [セキュリティ] > [リモートサイトの設定] にホストを追加します。
4. Update useHTTPService を true に更新します。
000396217

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.