Skip to main content Link Search Menu Expand Document (external link)

The Profile Factory Interface

The profile factory interface creates profile objects that are initialized correctly.

There is only one profile factory and it can always be found at jancy.profileFactory.

Methods

profileFactory.addBuyer(profile, buyer)

  • profile (object) a profile object created by profileFactory.create()
  • buyer (string) the ID of the buyer

Adds a buyer to the given profile.

buyer will be normalized to be lowercase and duplicates will be ignored.

profileFactory.addCard(profile, data)

  • profile (object) a profile object created by profileFactory.create()
  • data (object)
    • number (string) the credit card number
    • cvv (string) the CVV of the credit card
    • expDate (string) optional expiration date of the card
    • label (string) optional the label to assign to the card
    • address (string) optional address line associated with the card
    • address2 (string) optional address line 2 associated with the card
    • city (string) optional city associated with the card
    • state (string) optional state associated with the card
    • zip (string) optional zip code associated with the card
    • note (string) optional an optional note to associate with the card

expDate format is MM/YY.

Adds a credit card to the given profile.

profileFactory.addProxy(profile, proxy)

  • profile (object) a profile object created by profileFactory.create()
  • proxy (object) a proxy object created by proxyFactory.createSync()

Adds a proxy to the given profile.

profileFactory.addSite(profile, data)

  • profile (object) a profile object created by profileFactory.create()
  • data (object)
    • site (string)
    • isPattern (boolean)
    • fields ([object])

Adds a site record to the given profile.

This needs better documentation.

profileFactory.create(data)

  • data (object)
    • providerId (string) value passed in to the provider.loadProfiles() method
    • groupName (string) the group to assign this profile to
    • profileName (string) the name of the profile
    • email (string) the email associated with the profile
    • name (string) optional
    • adress (string) optional
    • address2 (string) optional
    • city (string) optional
    • state (string) optional
    • zip (string) optional
    • phoneNumber (string) optional
    • smsNumber (string) optional
    • passcodes ([string]) optional
    • persistCookies (boolean) optional
    • dob (string) optional
    • notes (string) optional
    • free1 (string) optional
    • free2 (string) optional
    • free3 (string) optional
    • free4 (string) optional
    • free5 (string) optional
    • url (string) optional
    • tabColor (string) optional
    • timezone (string) optional

Returns a profile object suitable for additional calls to other profile factory methods and profileRegistry.addProfile().