public async Task <OfferingSaleCancellationResponse> CancelAsync(Guid offeringId)
        {
            IVendorCredentials credentials;

            if (_defaultCredentials == null)
            {
#if NETFULL
                credentials = new VendorCredentialsFromConfig();
#else
                throw new InvalidOperationException("No default credentials defined");
#endif
            }
            else
            {
                credentials = _defaultCredentials;
            }

            return(await CancelAsync(offeringId, credentials));
        }
Esempio n. 2
0
        public async Task <OfferingResultWriteResponse> WriteAsync(OfferingResult offeringResult)
        {
            IVendorCredentials credentials;

            if (_defaultCredentials == null)
            {
#if NETFULL
                credentials = new VendorCredentialsFromConfig();
#else
                throw new InvalidOperationException("No default credentials defined");
#endif
            }
            else
            {
                credentials = _defaultCredentials;
            }

            return(await WriteAsync(offeringResult, credentials));
        }
Esempio n. 3
0
        public async Task <Offering> RequestAsync(OfferingRequest request)
        {
            IVendorCredentials credentials;

            if (_defaultCredentials == null)
            {
#if NETFULL
                credentials = new VendorCredentialsFromConfig();
#else
                throw new InvalidOperationException("No default credentials defined");
#endif
            }
            else
            {
                credentials = _defaultCredentials;
            }

            return(await RequestAsync(request, credentials));
        }
        public static IOfferingSaleCanceller Create()
        {
            var credentials = new VendorCredentialsFromConfig();

            return(Create(credentials.Id, credentials.SharedSecret));
        }
Esempio n. 5
0
        public static IOfferingResultWriter Create()
        {
            var credentials = new VendorCredentialsFromConfig();

            return(Create(credentials.Id, credentials.SharedSecret));
        }