Skip to content
This repository has been archived by the owner on Jan 23, 2020. It is now read-only.

Latest commit

 

History

History
108 lines (74 loc) · 3.47 KB

GiftMessageGuestCartRepositoryV1Api.md

File metadata and controls

108 lines (74 loc) · 3.47 KB

MagentoApi\GiftMessageGuestCartRepositoryV1Api

All URIs are relative to /rest/default

Method HTTP request Description
giftMessageGuestCartRepositoryV1GetGet GET /V1/guest-carts/{cartId}/gift-message
giftMessageGuestCartRepositoryV1SavePost POST /V1/guest-carts/{cartId}/gift-message

giftMessageGuestCartRepositoryV1GetGet

\MagentoApi\Model\GiftMessageDataMessageInterface giftMessageGuestCartRepositoryV1GetGet($cart_id)

Return the gift message for a specified order.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new MagentoApi\Api\GiftMessageGuestCartRepositoryV1Api(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$cart_id = "cart_id_example"; // string | The shopping cart ID.

try {
    $result = $apiInstance->giftMessageGuestCartRepositoryV1GetGet($cart_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GiftMessageGuestCartRepositoryV1Api->giftMessageGuestCartRepositoryV1GetGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
cart_id string The shopping cart ID.

Return type

\MagentoApi\Model\GiftMessageDataMessageInterface

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

giftMessageGuestCartRepositoryV1SavePost

bool giftMessageGuestCartRepositoryV1SavePost($cart_id, $body)

Set the gift message for an entire order.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new MagentoApi\Api\GiftMessageGuestCartRepositoryV1Api(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$cart_id = "cart_id_example"; // string | The cart ID.
$body = new \stdClass; // object |

try {
    $result = $apiInstance->giftMessageGuestCartRepositoryV1SavePost($cart_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GiftMessageGuestCartRepositoryV1Api->giftMessageGuestCartRepositoryV1SavePost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
cart_id string The cart ID.
body object [optional]

Return type

bool

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]