Skip to content

Latest commit

 

History

History
54 lines (45 loc) · 5.45 KB

customer.md

File metadata and controls

54 lines (45 loc) · 5.45 KB

Customer

Represents a Square customer profile in the Customer Directory of a Square seller.

Structure

Customer

Fields

Name Type Tags Description Getter Setter
id ?string Optional A unique Square-assigned ID for the customer profile.

If you need this ID for an API request, use the ID returned when you created the customer profile or call the SearchCustomers
or ListCustomers endpoint.
getId(): ?string setId(?string id): void
createdAt ?string Optional The timestamp when the customer profile was created, in RFC 3339 format. getCreatedAt(): ?string setCreatedAt(?string createdAt): void
updatedAt ?string Optional The timestamp when the customer profile was last updated, in RFC 3339 format. getUpdatedAt(): ?string setUpdatedAt(?string updatedAt): void
cards ?(Card[]) Optional Payment details of the credit, debit, and gift cards stored on file for the customer profile.

DEPRECATED at version 2021-06-16. Replaced by calling ListCards (for credit and debit cards on file)
or ListGiftCards (for gift cards on file) and including the customer_id query parameter.
For more information, see Migration notes.
getCards(): ?array setCards(?array cards): void
givenName ?string Optional The given name (that is, the first name) associated with the customer profile. getGivenName(): ?string setGivenName(?string givenName): void
familyName ?string Optional The family name (that is, the last name) associated with the customer profile. getFamilyName(): ?string setFamilyName(?string familyName): void
nickname ?string Optional A nickname for the customer profile. getNickname(): ?string setNickname(?string nickname): void
companyName ?string Optional A business name associated with the customer profile. getCompanyName(): ?string setCompanyName(?string companyName): void
emailAddress ?string Optional The email address associated with the customer profile. getEmailAddress(): ?string setEmailAddress(?string emailAddress): void
address ?Address Optional Represents a postal address in a country.
For more information, see Working with Addresses.
getAddress(): ?Address setAddress(?Address address): void
phoneNumber ?string Optional The phone number associated with the customer profile. getPhoneNumber(): ?string setPhoneNumber(?string phoneNumber): void
birthday ?string Optional The birthday associated with the customer profile, in YYYY-MM-DD format. For example, 1998-09-21
represents September 21, 1998, and 0000-09-21 represents September 21 (without a birth year).
getBirthday(): ?string setBirthday(?string birthday): void
referenceId ?string Optional An optional second ID used to associate the customer profile with an
entity in another system.
getReferenceId(): ?string setReferenceId(?string referenceId): void
note ?string Optional A custom note associated with the customer profile. getNote(): ?string setNote(?string note): void
preferences ?CustomerPreferences Optional Represents communication preferences for the customer profile. getPreferences(): ?CustomerPreferences setPreferences(?CustomerPreferences preferences): void
creationSource ?string(CustomerCreationSource) Optional Indicates the method used to create the customer profile. getCreationSource(): ?string setCreationSource(?string creationSource): void
groupIds ?(string[]) Optional The IDs of customer groups the customer belongs to. getGroupIds(): ?array setGroupIds(?array groupIds): void
segmentIds ?(string[]) Optional The IDs of customer segments the customer belongs to. getSegmentIds(): ?array setSegmentIds(?array segmentIds): void
version ?int Optional The Square-assigned version number of the customer profile. The version number is incremented each time an update is committed to the customer profile, except for changes to customer segment membership and cards on file. getVersion(): ?int setVersion(?int version): void
taxIds ?CustomerTaxIds Optional Represents the tax ID associated with a customer profile. The corresponding tax_ids field is available only for customers of sellers in EU countries or the United Kingdom.
For more information, see Customer tax IDs.
getTaxIds(): ?CustomerTaxIds setTaxIds(?CustomerTaxIds taxIds): void

Example (as JSON)

{
  "id": "id8",
  "created_at": "created_at6",
  "updated_at": "updated_at6",
  "cards": [
    {
      "id": "id8",
      "card_brand": "DISCOVER",
      "last_4": "last_40",
      "exp_month": 152,
      "exp_year": 144
    }
  ],
  "given_name": "given_name0"
}