Beispiel #1
0
 public SquareCustomer(
     ASquare_Customer aCustomer,
     IApplicationLocale locale)
 {
     ACustomer = aCustomer;
     Locale    = locale;
 }
        public async Task <ASquare_Customer> GetCustomerAsync(long squareCustomerId)
        {
            using var log = BeginFunction(nameof(SquareAdminService), nameof(GetCustomerAsync), squareCustomerId);
            try
            {
                await Assert(SecurityPolicy.IsPrivileged).ConfigureAwait(false);

                var mCustomer = await SquareMicroService.GetSquareCustomerAsync(squareCustomerId);

                var result = new ASquare_Customer()
                {
                    MCustomer = mCustomer
                };

                log.Result(result);

                return(result);
            }
            catch (Exception ex)
            {
                log.Exception(ex);
                throw;
            }
        }
 public SquareCustomer CreateSquareCustomer(ASquare_Customer aCustomer)
 {
     return(new SquareCustomer(aCustomer, Locale));
 }