forked from Acumatica/AcumaticaRESTAPIClientForCSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dnaumov
committed
Jan 31, 2020
1 parent
b11f4cd
commit 618eb3f
Showing
579 changed files
with
3,942 additions
and
4,578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 48 additions & 48 deletions
96
Acumatica REST API Console Application/SOAPLikeExample.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
using Acumatica.DefaultEndpoint_18_200_001.Model; | ||
using SOAPLikeWrapperForREST; | ||
using System; | ||
|
||
namespace AcumaticaRestApiExample | ||
{ | ||
public class SOAPLikeExample | ||
{ | ||
public static void ExampleMethod(string siteURL, string username, string password, string tenant = null, string branch = null, string locale = null) | ||
{ | ||
var restClient = new RESTClient(siteURL); | ||
|
||
try | ||
{ | ||
restClient.Login(username, password, tenant, branch, locale); | ||
Console.WriteLine("Logged In"); | ||
|
||
Shipment shipment = new Shipment() | ||
{ | ||
ShipmentNbr = new StringSearch() { Value = "002644" }, | ||
//Packages = new ShipmentPackage[] | ||
//{ | ||
// new ShipmentPackage { | ||
// ReturnBehavior= ReturnBehavior.All, | ||
// PacakgeContents = new PacakgeContents[] | ||
// { | ||
// new PacakgeContents() { ReturnBehavior= ReturnBehavior.All} | ||
// } | ||
// } | ||
//} | ||
}; | ||
shipment = (Shipment)restClient.Get(shipment); | ||
|
||
Console.WriteLine("Shipped Qty= " + shipment.ShippedQty.Value); | ||
} | ||
catch (Exception e) | ||
{ | ||
Console.WriteLine("Error: " + e.Message); | ||
} | ||
finally | ||
{ | ||
restClient.Logout(); | ||
Console.WriteLine("Logged Out"); | ||
} | ||
|
||
} | ||
} | ||
} | ||
using Acumatica.Default_18_200_001.Model; | ||
using SOAPLikeWrapperForREST; | ||
using System; | ||
|
||
namespace AcumaticaRestApiExample | ||
{ | ||
public class SOAPLikeExample | ||
{ | ||
public static void ExampleMethod(string siteURL, string username, string password, string tenant = null, string branch = null, string locale = null) | ||
{ | ||
var restClient = new RESTClient(siteURL); | ||
|
||
try | ||
{ | ||
restClient.Login(username, password, tenant, branch, locale); | ||
Console.WriteLine("Logged In"); | ||
|
||
Shipment shipment = new Shipment() | ||
{ | ||
ShipmentNbr = new StringSearch() { Value = "002644" }, | ||
//Packages = new ShipmentPackage[] | ||
//{ | ||
// new ShipmentPackage { | ||
// ReturnBehavior= ReturnBehavior.All, | ||
// PacakgeContents = new PacakgeContents[] | ||
// { | ||
// new PacakgeContents() { ReturnBehavior= ReturnBehavior.All} | ||
// } | ||
// } | ||
//} | ||
}; | ||
shipment = (Shipment)restClient.Get(shipment); | ||
|
||
Console.WriteLine("Shipped Qty= " + shipment.ShippedQty.Value); | ||
} | ||
catch (Exception e) | ||
{ | ||
Console.WriteLine("Error: " + e.Message); | ||
} | ||
finally | ||
{ | ||
restClient.Logout(); | ||
Console.WriteLine("Logged Out"); | ||
} | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.