/// <summary>
 /// Sets the ListInboundShipmentsByNextTokenResult property.
 /// </summary>
 /// <param name="listInboundShipmentsByNextTokenResult">ListInboundShipmentsByNextTokenResult property.</param>
 /// <returns>this instance.</returns>
 public ListInboundShipmentsByNextTokenResponse WithListInboundShipmentsByNextTokenResult(ListInboundShipmentsByNextTokenResult listInboundShipmentsByNextTokenResult)
 {
     this._listInboundShipmentsByNextTokenResult = listInboundShipmentsByNextTokenResult;
     return this;
 }
예제 #2
0
        /// <summary>
        /// Get Next Inbound Shipment Status
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnListInboundShipmentsByNextToken_Click(object sender, RoutedEventArgs e)
        {
            string SellerId           = CommonValue.strMerchantId;
            string MarketplaceId      = CommonValue.strMarketplaceId;
            string AccessKeyId        = CommonValue.strAccessKeyId;
            string SecretKeyId        = CommonValue.strSecretKeyId;
            string ApplicationVersion = CommonValue.strApplicationVersion;
            string ApplicationName    = CommonValue.strApplicationName;
            string MWSAuthToken       = CommonValue.strMWSAuthToken;
            string strbuff            = string.Empty;

            FBAInboundServiceMWSConfig config = new FBAInboundServiceMWSConfig();

            config.ServiceURL = CommonValue.strServiceURL;

            FBAInboundServiceMWSClient client = new FBAInboundServiceMWSClient(
                AccessKeyId,
                SecretKeyId,
                ApplicationName,
                ApplicationVersion,
                config);
            ListInboundShipmentsRequest request = new ListInboundShipmentsRequest();

            request.SellerId     = SellerId;
            request.MWSAuthToken = MWSAuthToken;
            request.Marketplace  = MarketplaceId;
            ShipmentStatusList list = new ShipmentStatusList();

            list.member.Add("WORKING");
            request.ShipmentStatusList = list;
            ListInboundShipmentsResponse response = client.ListInboundShipments(request);

            if (response.IsSetListInboundShipmentsResult())
            {
                if (response.ListInboundShipmentsResult.NextToken != null)
                {
                    ListInboundShipmentsByNextTokenRequest request1 = new ListInboundShipmentsByNextTokenRequest();
                    request1.SellerId    = SellerId;
                    request1.Marketplace = MarketplaceId;
                    request1.NextToken   = response.ListInboundShipmentsResult.NextToken;
                    ListInboundShipmentsByNextTokenResponse response1 = client.ListInboundShipmentsByNextToken(request1);
                    if (response1.IsSetListInboundShipmentsByNextTokenResult())
                    {
                        ListInboundShipmentsByNextTokenResult listInboundShipmentsResult = response1.ListInboundShipmentsByNextTokenResult;
                        if (listInboundShipmentsResult.IsSetShipmentData())
                        {
                            InboundShipmentList        shipmentData = listInboundShipmentsResult.ShipmentData;
                            List <InboundShipmentInfo> memberList   = shipmentData.member;
                            foreach (InboundShipmentInfo member in memberList)
                            {
                                // データ取得・表示
                                strbuff += "シップメント名:" + member.ShipmentName;
                            }
                        }
                    }
                }
                else
                {
                    strbuff = "次の情報がありません。";
                }
            }
            txtListInboundShipmentsByNextToken.Text = strbuff;
        }
 public override void ReadFragmentFrom(IMwsReader reader)
 {
     _listInboundShipmentsByNextTokenResult = reader.Read<ListInboundShipmentsByNextTokenResult>("ListInboundShipmentsByNextTokenResult");
     _responseMetadata = reader.Read<ResponseMetadata>("ResponseMetadata");
 }