Skip to content

Commit

Permalink
Merge pull request abuzuhri#751 from Cw733/main
Browse files Browse the repository at this point in the history
  • Loading branch information
abuzuhri authored Jul 23, 2024
2 parents 30c1d5c + 51653d0 commit 661278f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
namespace FikaAmazonAPI.SampleCode
{
public class FulFillmentInboundv20240320Sample
{
AmazonConnection amazonConnection;
public FulFillmentInboundv20240320Sample(AmazonConnection amazonConnection)
{
this.amazonConnection = amazonConnection;
}


public void CreateShipmentPlan()
{
FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInboundv20240320.CreateInboundPlanRequest oCreateInboundShipmentPlanRequest = new FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInboundv20240320.CreateInboundPlanRequest();

oCreateInboundShipmentPlanRequest.Name = "TestShipment";
oCreateInboundShipmentPlanRequest.DestinationMarketplaces = new List<string> {amazonConnection.GetCurrentMarketplace.ID};


oCreateInboundShipmentPlanRequest.SourceAddress = new FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInboundv20240320.Address();
oCreateInboundShipmentPlanRequest.SourceAddress.AddressLine1 = "Add";
oCreateInboundShipmentPlanRequest.SourceAddress.AddressLine2 = "ADD2";
oCreateInboundShipmentPlanRequest.SourceAddress.City = "City";
oCreateInboundShipmentPlanRequest.SourceAddress.CountryCode = "AE";
oCreateInboundShipmentPlanRequest.SourceAddress.PostalCode = "0000";
oCreateInboundShipmentPlanRequest.SourceAddress.Name = "Name";



oCreateInboundShipmentPlanRequest.Items = new List<AmazonSpApiSDK.Models.FulfillmentInboundv20240320.ItemInput>();
FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInboundv20240320.ItemInput oInboundShipmentPlanRequestItem = new FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInboundv20240320.ItemInput();
oInboundShipmentPlanRequestItem.Msku = "16118";
oInboundShipmentPlanRequestItem.Quantity = 1;
oInboundShipmentPlanRequestItem.LabelOwner = AmazonSpApiSDK.Models.FulfillmentInboundv20240320.LabelOwner.SELLER;
oInboundShipmentPlanRequestItem.PrepOwner = AmazonSpApiSDK.Models.FulfillmentInboundv20240320.PrepOwner.SELLER;

var oResult = amazonConnection.FulFillmentInboundv20240320.CreateInboundPlan(oCreateInboundShipmentPlanRequest);

}



}
}
4 changes: 3 additions & 1 deletion Source/FikaAmazonAPI/AmazonConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class AmazonConnection
public UploadService Upload => this._Upload ?? throw _NoCredentials;
public TokenService Tokens => this._Tokens ?? throw _NoCredentials;
public FulFillmentInboundService FulFillmentInbound => this._FulFillmentInbound ?? throw _NoCredentials;
public FulFillmentInboundServicev20240320 FulFillmentInboundv20240320 => this._FulFillmentInboundv20240320 ?? throw _NoCredentials;
public FulFillmentOutboundService FulFillmentOutbound => this._FulFillmentOutbound ?? throw _NoCredentials;
public VendorDirectFulfillmentOrderService VendorDirectFulfillmentOrders => this._VendorDirectFulfillmentOrders ?? throw _NoCredentials;
public VendorOrderService VendorOrders => this._VendorOrders ?? throw _NoCredentials;
Expand Down Expand Up @@ -77,9 +78,9 @@ public class AmazonConnection
private ShippingService _Shipping { get; set; }
private ShippingServiceV2 _ShippingV2 { get; set; }
private UploadService _Upload { get; set; }

private TokenService _Tokens { get; set; }
private FulFillmentInboundService _FulFillmentInbound { get; set; }
private FulFillmentInboundServicev20240320 _FulFillmentInboundv20240320 { get; set; }
private FulFillmentOutboundService _FulFillmentOutbound { get; set; }
private VendorDirectFulfillmentOrderService _VendorDirectFulfillmentOrders { get; set; }
private VendorOrderService _VendorOrders { get; set; }
Expand Down Expand Up @@ -141,6 +142,7 @@ private void Init(AmazonCredential Credentials)
this._Upload = new UploadService(this.Credentials);
this._Tokens = new TokenService(this.Credentials);
this._FulFillmentInbound = new FulFillmentInboundService(this.Credentials);
this._FulFillmentInboundv20240320 = new FulFillmentInboundServicev20240320(this.Credentials);
this._FulFillmentOutbound = new FulFillmentOutboundService(this.Credentials);
this._VendorDirectFulfillmentOrders = new VendorDirectFulfillmentOrderService(this.Credentials);
this._VendorOrders = new VendorOrderService(this.Credentials);
Expand Down

0 comments on commit 661278f

Please sign in to comment.