Ejemplo n.º 1
0
 /// <summary>
 /// Initializes the ServiceBase object
 /// </summary>
 /// <param name="apiKey">Api key</param>
 public ServiceBase(string apiKey)
 {
     requester          = new RequestManager(ApiUrlBase, apiKey);
     accountFactory     = new AccountFactory();
     balanceFactory     = new BalanceFactory();
     bankAccountFactory = new BankAccountFactory();
     cardFactory        = new CardFactory();
     chargeFactory      = new ChargeFactory();
     customerFactory    = new CustomerFactory();
     recipientFactory   = new RecipientFactory();
     refundFactory      = new RefundFactory();
     tokenFactory       = new TokenFactory();
     transferFactory    = new TransferFactory();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes the ServiceBase object
 /// </summary>
 /// <param name="requestManager">IRequestManager object</param>
 /// <param name="apiKey">Api key</param>
 public ServiceBase(IRequestManager requestManager, string apiKey)
 {
     if (requestManager == null)
     {
         requester = new RequestManager(ApiUrlBase, apiKey);
     }
     else
     {
         requester = requestManager;
     }
     accountFactory     = new AccountFactory();
     balanceFactory     = new BalanceFactory();
     bankAccountFactory = new BankAccountFactory();
     cardFactory        = new CardFactory();
     chargeFactory      = new ChargeFactory();
     customerFactory    = new CustomerFactory();
     recipientFactory   = new RecipientFactory();
     refundFactory      = new RefundFactory();
     tokenFactory       = new TokenFactory();
     transactionFactory = new TransactionFactory();
     transferFactory    = new TransferFactory();
 }