internal GetShippingLabelResponse GetShippingLabel(GetShippingLabelRequest request)
        {
            var marshaller   = new GetShippingLabelRequestMarshaller();
            var unmarshaller = GetShippingLabelResponseUnmarshaller.Instance;

            return(Invoke <GetShippingLabelRequest, GetShippingLabelResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetShippingLabel operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetShippingLabel operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <GetShippingLabelResponse> GetShippingLabelAsync(GetShippingLabelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetShippingLabelRequestMarshaller();
            var unmarshaller = GetShippingLabelResponseUnmarshaller.Instance;

            return(InvokeAsync <GetShippingLabelRequest, GetShippingLabelResponse>(request, marshaller,
                                                                                   unmarshaller, cancellationToken));
        }
예제 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetShippingLabel operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetShippingLabel operation on AmazonImportExportClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetShippingLabel
        ///         operation.</returns>
        public IAsyncResult BeginGetShippingLabel(GetShippingLabelRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new GetShippingLabelRequestMarshaller();
            var unmarshaller = GetShippingLabelResponseUnmarshaller.Instance;

            return(BeginInvoke <GetShippingLabelRequest>(request, marshaller, unmarshaller,
                                                         callback, state));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetShippingLabel operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetShippingLabel operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public virtual Task <GetShippingLabelResponse> GetShippingLabelAsync(GetShippingLabelRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetShippingLabelRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetShippingLabelResponseUnmarshaller.Instance;

            return(InvokeAsync <GetShippingLabelResponse>(request, options, cancellationToken));
        }
        /// <summary>
        /// This operation generates a pre-paid UPS shipping label that you will use to ship your
        /// device to AWS for processing.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetShippingLabel service method.</param>
        ///
        /// <returns>The response from the GetShippingLabel service method, as returned by ImportExport.</returns>
        /// <exception cref="Amazon.ImportExport.Model.CanceledJobIdException">
        /// The specified job ID has been canceled and is no longer valid.
        /// </exception>
        /// <exception cref="Amazon.ImportExport.Model.ExpiredJobIdException">
        /// Indicates that the specified job has expired out of the system.
        /// </exception>
        /// <exception cref="Amazon.ImportExport.Model.InvalidAccessKeyIdException">
        /// The AWS Access Key ID specified in the request did not match the manifest's accessKeyId
        /// value. The manifest and the request authentication must use the same AWS Access Key
        /// ID.
        /// </exception>
        /// <exception cref="Amazon.ImportExport.Model.InvalidAddressException">
        /// The address specified in the manifest is invalid.
        /// </exception>
        /// <exception cref="Amazon.ImportExport.Model.InvalidJobIdException">
        /// The JOBID was missing, not found, or not associated with the AWS account.
        /// </exception>
        /// <exception cref="Amazon.ImportExport.Model.InvalidParameterException">
        /// One or more parameters had an invalid value.
        /// </exception>
        /// <exception cref="Amazon.ImportExport.Model.InvalidVersionException">
        /// The client tool version is invalid.
        /// </exception>
        public virtual GetShippingLabelResponse GetShippingLabel(GetShippingLabelRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetShippingLabelRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetShippingLabelResponseUnmarshaller.Instance;

            return(Invoke <GetShippingLabelResponse>(request, options));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetShippingLabel operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetShippingLabel operation on AmazonImportExportClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetShippingLabel
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/importexport-2010-06-01/GetShippingLabel">REST API Reference for GetShippingLabel Operation</seealso>
        public virtual IAsyncResult BeginGetShippingLabel(GetShippingLabelRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetShippingLabelRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetShippingLabelResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }
        [Fact]//11.6 xml USA
        public async Task GetShippingLabel_XML_USA()
        {
            var request = new GetShippingLabelRequest()
            {
                RequestBody = new GetShippingLabelRequestBody()
                {
                    RequestID = "282Q5AUAMQKIE"
                }
            };

            CheckRequestString <GetShippingLabelRequest>(request);
            var body = await fadeAPI_USA_XML.GetShippingLabel(request);

            Assert.IsType <GetShippinLabelResponse>(body);
        }