Exemplo n.º 1
0
        public void DeviceFarmRenewOffering()
        {
            #region to-renew-a-device-slot-offering-1472648899785

            var response = client.RenewOffering(new RenewOfferingRequest
            {
                OfferingId = "D68B3C05-1BA6-4360-BC69-12345EXAMPLE", // You can get the offering ID by using the list-offerings CLI command.
                Quantity   = 1
            });

            OfferingTransaction offeringTransaction = response.OfferingTransaction;

            #endregion
        }
Exemplo n.º 2
0
        public ResponseDto <OfferingTransaction> Save([FromBody] OfferingTransaction offeringTransaction)
        {
            ResponseDto <OfferingTransaction> response = new ResponseDto <OfferingTransaction>(_commonResource);

            try
            {
                response.Data = _offeringTransactionService.Save(offeringTransaction);
                return(response);
            }
            catch (Exception ex)
            {
                return(response.HandleException(response));
            }
        }
Exemplo n.º 3
0
        public ResponseDto <bool> Delete([FromBody] OfferingTransaction offeringTransaction)
        {
            ResponseDto <bool> response = new ResponseDto <bool>(_commonResource);

            try
            {
                _offeringTransactionService.Delete(offeringTransaction);
                return(response);
            }
            catch (Exception ex)
            {
                return(response.HandleDeleteException(response, ex));
            }
        }
Exemplo n.º 4
0
        public void DeviceFarmPurchaseOffering()
        {
            #region to-purchase-a-device-slot-offering-1472648146343

            var client   = new AmazonDeviceFarmClient();
            var response = client.PurchaseOffering(new PurchaseOfferingRequest
            {
                OfferingId = "D68B3C05-1BA6-4360-BC69-12345EXAMPLE", // You can get the offering ID by using the list-offerings CLI command.
                Quantity   = 1
            });

            OfferingTransaction offeringTransaction = response.OfferingTransaction;

            #endregion
        }