Tabnine Logo
Customer$Builder
Code IndexAdd Tabnine to your IDE (free)

How to use
Customer$Builder
in
it.tidalwave.accounting.model

Best Java code snippets using it.tidalwave.accounting.model.Customer$Builder (Showing top 8 results out of 315)

origin: it.tidalwave.accounting/it-tidalwave-accounting-marshalling-xml

 public void fill (final @Nonnull Accounting accounting) 
  {
   final CustomerRegistry customerRegistry = accounting.getCustomerRegistry();
   final ProjectRegistry projectRegistry = accounting.getProjectRegistry();
   final InvoiceRegistry invoiceRegistry = accounting.getInvoiceRegistry();
   customersXml.forEach(customer -> customerRegistry.addCustomer().with(customer.toBuilder()).create());
   projectsXml.forEach(project -> projectRegistry.addProject().with(project.toBuilder(accounting)).create());
   invoicesxml.forEach(invoice -> invoiceRegistry.addInvoice().with(invoice.toBuilder(accounting)).create());
  }
}
origin: it.tidalwave.accounting/it-tidalwave-accounting-model

/*******************************************************************************************************************
 *
 *
 *
 ******************************************************************************************************************/
@Nonnull
public static Builder builder()
 {
  return new Builder();
 }
origin: it.tidalwave.accounting/it-tidalwave-accounting-model

      .withId(new Id("" + nextId++))
      .withName("ACME Consulting")
      .withBillingAddress(Address.builder().withStreet("Corso Italia 10")
                         .withCity("Genova")
                         .withState("GE")
                         .withCountry("Italy")
                         .create())
      .withVatNumber("IT6546034963")
      .create();
final Customer acmeFinancing =
    customerRegistry.addCustomer()
      .withId(new Id("" + nextId++))
      .withName("ACME Financing")
      .withBillingAddress(Address.builder().withStreet("Corso Magenta 20")
                         .withCity("Milano")
                         .withState("MI")
                         .withCountry("Italy")
                         .create())
      .withVatNumber("IT3465346092")
     .  create();
origin: it.tidalwave.accounting/it-tidalwave-accounting-model-impl-inmemory

                  .withCountry("USA")
                  .create();
final Customer c1 = Customer.builder().withId(new Id("1"))
                   .withName("Acme Corp.")
                   .withVatNumber("1233455345")
                   .withBillingAddress(a1)
                   .create();
final Project p = Project.builder().withId(new Id("2"))
                  .withBudget(new Money(10500, "EUR"))
origin: it.tidalwave.accounting/it-tidalwave-accounting-importer-ibiz

/*******************************************************************************************************************
 *
 * {@inheritDoc}
 *
 ******************************************************************************************************************/
@Override
public void importCustomers()
 throws IOException
 {
  log.debug("importCustomers()");
  final NativeAddressBook addressBook = NativeAddressBook.instance();
  IBizUtils.loadConfiguration(path.resolve("clients")).getStream("clients").forEach(customerConfig -> 
   {
    final String firstName = trim(customerConfig.getString("firstName"));
    final String clientCompany = customerConfig.getString("clientCompany");
    final Contact contact = getContact(addressBook, firstName, clientCompany);
    customerRegistry.addCustomer().withId(customerConfig.getId("addressBookId"))
                   .withName(firstName)
                   .withBillingAddress(getAddress(contact))
                   .withVatNumber(getVatNumber(contact))
                   .create();
   });
 }
origin: it.tidalwave.accounting/it-tidalwave-accounting-model-impl-inmemory

 @Test
 public void toString_must_return_all_the_fields()
  {
   final Address a1 = Address.builder().withStreet("Foo Bar rd 20")
                     .withCity("San Francisco")
                     .withZip("12345")
                     .withState("CA")
                     .withCountry("USA")
                     .create();
   final Customer c1 = Customer.builder().withId(new Id("the id"))
                      .withName("Acme Corp.")
                      .withVatNumber("1233455345")
                      .withBillingAddress(a1)
                      .create();
   assertThat(c1.toString(), is("InMemoryCustomer(id=the id, name=Acme Corp., billingAddress=Address(street=Foo Bar rd 20, "
                 + "city=San Francisco, state=CA, country=USA, zip=12345), vatNumber=1233455345)"));
  }
}
origin: it.tidalwave.accounting/it-tidalwave-accounting-marshalling-xml

public CustomerXml (final @Nonnull Customer customer)
 {
  final Customer.Builder builder = customer.toBuilder();
  this.id = builder.getId();
  this.name = builder.getName();
  this.billingAddressXml = new AddressXml(builder.getBillingAddress());
  this.vatNumber = builder.getVatNumber();
 }

origin: it.tidalwave.accounting/it-tidalwave-accounting-marshalling-xml

 @Nonnull
 public Customer.Builder toBuilder()
  {
   return new Customer.Builder().withId(id)
                  .withName(name)
                  .withBillingAddress(billingAddressXml.toAddress())
                  .withVatNumber(vatNumber);
  }
}
it.tidalwave.accounting.modelCustomer$Builder

Most used methods

  • create
  • withBillingAddress
  • withId
  • withName
  • withVatNumber
  • <init>
  • getBillingAddress
  • getId
  • getName
  • getVatNumber
  • with
  • withCallback
  • with,
  • withCallback

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now