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 byprofileFactory.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 byprofileFactory.create()
data
(object
)number
(string
) the credit card numbercvv
(string
) the CVV of the credit cardexpDate
(string
) optional expiration date of the cardlabel
(string
) optional the label to assign to the cardaddress
(string
) optional address line associated with the cardaddress2
(string
) optional address line 2 associated with the cardcity
(string
) optional city associated with the cardstate
(string
) optional state associated with the cardzip
(string
) optional zip code associated with the cardnote
(string
) optional an optional note to associate with the card
expDate
format isMM/YY
.
Adds a credit card to the given profile.
profileFactory.addProxy(profile, proxy)
profile
(object
) a profile object created byprofileFactory.create()
proxy
(object
) a proxy object created byproxyFactory.createSync()
Adds a proxy to the given profile.
profileFactory.addSite(profile, data)
profile
(object
) a profile object created byprofileFactory.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 theprovider.loadProfiles()
methodgroupName
(string
) the group to assign this profile toprofileName
(string
) the name of the profileemail
(string
) the email associated with the profilename
(string
) optionaladress
(string
) optionaladdress2
(string
) optionalcity
(string
) optionalstate
(string
) optionalzip
(string
) optionalphoneNumber
(string
) optionalsmsNumber
(string
) optionalpasscodes
([string
]) optionalpersistCookies
(boolean
) optionaldob
(string
) optionalnotes
(string
) optionalfree1
(string
) optionalfree2
(string
) optionalfree3
(string
) optionalfree4
(string
) optionalfree5
(string
) optionalurl
(string
) optionaltabColor
(string
) optionaltimezone
(string
) optional
Returns a profile object suitable for additional calls to other profile factory methods and profileRegistry.addProfile()
.