I'm using Vpim to generate .vcf files that users can then import into their address books. The problem that I'm having is that the information that their downloading is for a Company and not a person so I need to mark the card as being such. Is there a way to do this using Vpim or is there another gem that I could use to accomplish this?
def to_vcf
card = Vpim::Vcard::Maker.make2 do |maker|
...
end
end
Source of a Business Card from Address Book
BEGIN:VCARD
VERSION:3.0
N:;;;;
FN:The Flow Skatepark
ORG:The Flow Skatepark;
item1.TEL;type=pref:(614) 864-1610
item1.X-ABLabel:Work #
item2.ADR;type=WORK;type=pref:;;4252 Groves Rd;Columbus;OH;43232;USA
item2.X-ABADR:us
BDAY;value=date:2001-07-06
X-ABShowAs:COMPANY
X-ABUID:5F7349CB-369F-4EAC-AB65-49ED902BEF9F\:ABPerson
END:VCARD
Source of a Non-Business Card from Address Book
BEGIN:VCARD
VERSION:3.0
N:;The Flow Skatepark;;;
FN:The Flow Skatepark
item1.TEL;type=pref:(614) 864-1610
item1.X-ABLabel:Work #
item2.ADR;type=WORK;type=pref:;;4252 Groves Rd;Columbus;OH;43232;USA
item2.X-ABADR:us
BDAY;value=date:2001-07-06
X-ABUID:5F7349CB-369F-4EAC-AB65-49ED902BEF9F\:ABPerson
END:VCARD
Obviously there are two main differences in these code samples:
- ORG:The Flow Skatepark;
- X-ABShowAs:COMPANY
I don't know how this translates into Vpim however.