public static void Execute()
        {
            dynamic endpoints = new Endpoints(JObject.Parse(File.ReadAllText("credentials.json")));

            var param = new {
                id     = 0,
                parcel = 1
            };

            try {
                var response = endpoints.CancelParcel(param);
                Console.WriteLine(response);
            } catch (GnException e) {
                Console.WriteLine(e.ErrorType);
                Console.WriteLine(e.Message);
            }
        }
        public static void Execute()
        {
            dynamic endpoints = new Endpoints(Credentials.ClientId, Credentials.ClientSecret,
                                              Credentials.Sandbox);

            var param = new {
                id     = 0,
                parcel = 1
            };

            try {
                var response = endpoints.CancelParcel(param);
                Console.WriteLine(response);
            } catch (GnException e) {
                Console.WriteLine(e.ErrorType);
                Console.WriteLine(e.Message);
            }
        }
예제 #3
0
        public static void Execute()
        {
            dynamic endpoints = new Endpoints(Credentials.Default.ClientId, Credentials.Default.ClientSecret, Credentials.Default.Sandbox);

            var param = new
            {
                id = 0,
                parcel = 1
            };

            try
            {
                var response = endpoints.CancelParcel(param);
                Console.WriteLine(response);
            }
            catch (GnException e)
            {
                Console.WriteLine(e.ErrorType);
                Console.WriteLine(e.Message);
            }
        }