Example #1
0
 private static OrderShipment[] CreatePartialShipmentByOrderId(int orderId, PartialShipmentContents partialShipmentContents)
 {
     return(new[]
     {
         new OrderShipment
         {
             OrderID = orderId,
             ShipmentType = "Partial",
             PartialShipment = partialShipmentContents
         }
     });
 }
Example #2
0
 public async Task MarkOrderShippedAsync(string clientOrderId, PartialShipmentContents partialShipmentContents)
 {
     try
     {
         await AP.CreateSubmitAsync(ExtensionsInternal.CreateMethodCallInfo(this.AdditionalLogInfo)).Do(async() =>
         {
             var result = await this._client.SubmitOrderShipmentListAsync(this._credentials, this.AccountId, CreatePartialShipmentByClientId(clientOrderId, partialShipmentContents)).ConfigureAwait(false);
             this.CheckCaSuccess(result.SubmitOrderShipmentListResult);
         }).ConfigureAwait(false);
     }
     catch (Exception e)
     {
         throw new MarkOrderShippedException(clientOrderId, this.AccountId, partialShipmentContents.CarrierCode, partialShipmentContents.ClassCode, partialShipmentContents.TrackingNumber, e);
     }
 }
Example #3
0
 public void MarkOrderShipped(string clientOrderId, PartialShipmentContents partialShipmentContents)
 {
     try
     {
         AP.CreateSubmit(ExtensionsInternal.CreateMethodCallInfo(this.AdditionalLogInfo)).Do(() =>
         {
             var result = this._client.SubmitOrderShipmentList(this._credentials, this.AccountId, CreatePartialShipmentByClientId(clientOrderId, partialShipmentContents));
             this.CheckCaSuccess(result);
         });
     }
     catch (Exception e)
     {
         throw new MarkOrderShippedException(clientOrderId, this.AccountId, partialShipmentContents.CarrierCode, partialShipmentContents.ClassCode, partialShipmentContents.TrackingNumber, e);
     }
 }
		private static OrderShipment[] CreatePartialShipmentByClientId( string clientOrderId, PartialShipmentContents partialShipmentContents )
		{
			return new[]
			{
				new OrderShipment
				{
					ClientOrderIdentifier = clientOrderId,
					ShipmentType = "Partial",
					PartialShipment = partialShipmentContents
				}
			};
		}
		public async Task MarkOrderShippedAsync( string clientOrderId, PartialShipmentContents partialShipmentContents )
		{
			try
			{
				await AP.CreateSubmitAsync( ExtensionsInternal.CreateMethodCallInfo( this.AdditionalLogInfo ) ).Do( async () =>
				{
					var result = await this._client.SubmitOrderShipmentListAsync( this._credentials, this.AccountId, CreatePartialShipmentByClientId( clientOrderId, partialShipmentContents ) ).ConfigureAwait( false );
					this.CheckCaSuccess( result.SubmitOrderShipmentListResult );
				} ).ConfigureAwait( false );
			}
			catch( Exception e )
			{
				throw new MarkOrderShippedException( clientOrderId, this.AccountId, partialShipmentContents.CarrierCode, partialShipmentContents.ClassCode, partialShipmentContents.TrackingNumber, e );
			}
		}
		public void MarkOrderShipped( string clientOrderId, PartialShipmentContents partialShipmentContents )
		{
			try
			{
				AP.CreateSubmit( ExtensionsInternal.CreateMethodCallInfo( this.AdditionalLogInfo ) ).Do( () =>
				{
					var result = this._client.SubmitOrderShipmentList( this._credentials, this.AccountId, CreatePartialShipmentByClientId( clientOrderId, partialShipmentContents ) );
					this.CheckCaSuccess( result );
				} );
			}
			catch( Exception e )
			{
				throw new MarkOrderShippedException( clientOrderId, this.AccountId, partialShipmentContents.CarrierCode, partialShipmentContents.ClassCode, partialShipmentContents.TrackingNumber, e );
			}
		}
		private static OrderShipment[] CreatePartialShipmentByOrderId( int orderId, PartialShipmentContents partialShipmentContents )
		{
			return new[]
			{
				new OrderShipment
				{
					OrderID = orderId,
					ShipmentType = "Partial",
					PartialShipment = partialShipmentContents
				}
			};
		}
Example #8
0
 private static OrderShipment[] CreatePartialShipmentByClientId(string clientOrderId, PartialShipmentContents partialShipmentContents)
 {
     return(new[]
     {
         new OrderShipment
         {
             ClientOrderIdentifier = clientOrderId,
             ShipmentType = "Partial",
             PartialShipment = partialShipmentContents
         }
     });
 }