/// <summary>
 /// Get the invoice by id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='billingProfileName'>
 /// Billing Profile Id.
 /// </param>
 /// <param name='invoiceName'>
 /// Invoice Id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InvoiceSummary> GetAsync(this IInvoiceOperations operations, string billingAccountName, string billingProfileName, string invoiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(billingAccountName, billingProfileName, invoiceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get the invoice by id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='billingAccountName'>
 /// billing Account Id.
 /// </param>
 /// <param name='billingProfileName'>
 /// Billing Profile Id.
 /// </param>
 /// <param name='invoiceName'>
 /// Invoice Id.
 /// </param>
 public static InvoiceSummary Get(this IInvoiceOperations operations, string billingAccountName, string billingProfileName, string invoiceName)
 {
     return(operations.GetAsync(billingAccountName, billingProfileName, invoiceName).GetAwaiter().GetResult());
 }
 private void InitSubApis()
 {
     if (!isIntialized())
     {
         companyMetaDataOperations = new CompanyMetaDataTemplate(this.RestTemplate);
         this.companyId = this.companyMetaDataOperations.CompanyMetaData().ExternalRealmId;
         accountOperations = new AccountTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         customerOperations = new CustomerTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         invoiceOperations = new InvoiceTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         itemOperations = new ItemTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         paymentMethodOperations = new PaymentMethodTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         paymentOperations = new PaymentTemplate(this.RestTemplate, IsAuthorized, this.companyId);
         userOperations = new UserTemplate(this.RestTemplate, IsAuthorized);
     }
 }
Esempio n. 4
0
 public InvoiceService(IInvoiceOperations invoiceOperations)
 {
     _invoiceOperations = invoiceOperations;
 }
Esempio n. 5
0
 public ConsoleWebService(IConfigOperations configOperations, IInvoiceOperations invoiceOperations)
 {
     ConfigOperations  = configOperations;
     InvoiceOperations = invoiceOperations;
 }