Package net.amcintosh.freshbooks.models
Class Client
java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.json.GenericJson
net.amcintosh.freshbooks.models.Client
- All Implemented Interfaces:
Cloneable
,Map<String,
,Object> ConvertibleContent
A client in the new FreshBooks is a resource representing an entity you send invoices to.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet unique identifier of business client exists on.Billing address city.Billing address postal code.Billing address country.Short form of province for billing address.Billing address street.Billing address, additional street info.Business phone number.Description of industry client is in.Size of client's companyReturn the objects values as a Map suitable to sending to FreshBooks in a POST or PUT request.3-letter shortcode for client's preferred currency.getEmail()
Client's email.getFax()
Client's fax number.Client's first name.Client's home phone number.long
getId()
Get the unique identifier of this client within this business.Shortcode indicating user language e.g.The last client activity action.Client's last name.Client's mobile phone number.getNote()
Notes kept by admin about client.Name for client's business.Shipping address city.Shipping address postal code.Shipping address country.Short form of province for shipping address.Shipping address street.Shipping address, second street info.Get the signup time of the client.Get the time of last modification to the client.long
Duplicate of idGet the "Value Added Tax" nameGet the "Value Added Tax" numberGet the visibility state: active, deleted, or archivedvoid
setBillingCity
(String billingCity) Billing address city.void
setBillingCode
(String billingCode) Billing address postal code.void
setBillingCountry
(String billingCountry) Billing address country.void
setBillingProvince
(String billingProvince) Short form of province for billing address.void
setBillingStreet
(String billingStreet) Billing address street.void
setBillingStreet2
(String billingStreet2) Billing address, second street info.void
setBusinessPhone
(String businessPhone) Business phone number.void
setCompanyIndustry
(String companyIndustry) Description of industry client is in.void
setCompanySize
(String companySize) Size of client's companyvoid
setCurrencyCode
(String currencyCode) 3-letter shortcode for client's preferred currency.void
Client's email.void
Client's fax number.void
setFirstName
(String firstName) Client's first name.void
setHomePhone
(String homePhone) Client's home phone number.void
setLanguage
(String language) Shortcode indicating user language e.g.void
setLastName
(String lastName) Client's last name.void
setMobilePhone
(String mobilePhone) Client's mobile phone number.void
Notes kept by admin about client.void
setOrganization
(String organization) Name for client's business.void
setShippingCity
(String shippingCity) Shipping address city.void
setShippingCode
(String shippingCode) Shipping address postal code.void
setShippingCountry
(String shippingCountry) Shipping address country.void
setShippingProvince
(String shippingProvince) Short form of province for shipping address.void
setShippingStreet
(String shippingStreet) Shipping address street.void
setShippingStreet2
(String shippingStreet2) Shipping address, second street info.void
setVatName
(String vatName) Set the "Value Added Tax" namevoid
setVatNumber
(String vatNumber) Set the "Value Added Tax" numbervoid
setVisState
(VisState visState) Set the visibility state of the client.Methods inherited from class com.google.api.client.json.GenericJson
clone, getFactory, set, setFactory, toPrettyString, toString
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Client
public Client()
-
-
Method Details
-
getId
public long getId()Get the unique identifier of this client within this business.- Returns:
- Client Id
-
getAccountingSystemId
Get unique identifier of business client exists on.- Returns:
- Accounting System Id
-
getBusinessPhone
Business phone number.- Returns:
- String of the phone number
-
setBusinessPhone
Business phone number.- Parameters:
businessPhone
- String of the phone number
-
getCompanyIndustry
Description of industry client is in.- Returns:
- The industry
-
setCompanyIndustry
Description of industry client is in.- Parameters:
companyIndustry
- The industry
-
getCompanySize
Size of client's company- Returns:
- Eg. "10"
-
setCompanySize
Size of client's company- Parameters:
companySize
- Eg. "10"
-
getCurrencyCode
3-letter shortcode for client's preferred currency. Eg. USD, CAD, EUR- Returns:
- Eg. "USD"
-
setCurrencyCode
3-letter shortcode for client's preferred currency. Eg. USD, CAD, EUR- Parameters:
currencyCode
- Eg. "USD"
-
getEmail
Client's email.- Returns:
- The email
-
setEmail
Client's email.- Parameters:
email
- The email
-
getFax
Client's fax number.- Returns:
- Eg. "416-444-4444"
-
setFax
Client's fax number.- Parameters:
fax
- Eg. 416-444-4444
-
getFirstName
Client's first name.- Returns:
- Eg. "Gordon"
-
setFirstName
Client's first name.- Parameters:
firstName
- Eg. "Gordon"
-
getHomePhone
Client's home phone number.- Returns:
- Eg. 416-444-4444
-
setHomePhone
Client's home phone number.- Parameters:
homePhone
- Eg. 416-444-4444
-
getLanguage
Shortcode indicating user language e.g. "en"- Returns:
- Eg. "en"
-
setLanguage
Shortcode indicating user language e.g. "en"- Parameters:
language
- Eg. "en"
-
getLastActivity
The last client activity action.
Note: This returns as "null" in all calls unless a "last_activity" include parameter is provided.- Returns:
- eg. "Client Updated"
-
getLastName
Client's last name.- Returns:
- Eg. "Shumway"
-
setLastName
Client's last name.- Parameters:
lastName
- Eg. "Shumway"
-
getMobilePhone
Client's mobile phone number.- Returns:
- Eg. "416-444-4444"
-
setMobilePhone
Client's mobile phone number.- Parameters:
mobilePhone
- Eg. "416-444-4444"
-
getNote
Notes kept by admin about client.- Returns:
- The notes
-
setNote
Notes kept by admin about client.- Parameters:
note
- The notes
-
getOrganization
Name for client's business.- Returns:
- Organization name
-
setOrganization
Name for client's business.- Parameters:
organization
- Organization name
-
getBillingCity
Billing address city.- Returns:
- The city
-
setBillingCity
Billing address city.- Parameters:
billingCity
- The city
-
getBillingCode
Billing address postal code.- Returns:
- The postal code
-
setBillingCode
Billing address postal code.- Parameters:
billingCode
- The postal code
-
getBillingCountry
Billing address country.- Returns:
- The country
-
setBillingCountry
Billing address country.- Parameters:
billingCountry
- The country
-
getBillingProvince
Short form of province for billing address.- Returns:
- The province/state
-
setBillingProvince
Short form of province for billing address.- Parameters:
billingProvince
- The province/state
-
getBillingStreet
Billing address street.- Returns:
- The street address.
-
setBillingStreet
Billing address street.- Parameters:
billingStreet
- The street address.
-
getBillingStreet2
Billing address, additional street info.- Returns:
- The street address.
-
setBillingStreet2
Billing address, second street info.- Parameters:
billingStreet2
- The street address.
-
getShippingCity
Shipping address city.- Returns:
- The city
-
setShippingCity
Shipping address city.- Parameters:
shippingCity
- The city
-
getShippingCode
Shipping address postal code.- Returns:
- The postal code
-
setShippingCode
Shipping address postal code.- Parameters:
shippingCode
- The postal code
-
getShippingCountry
Shipping address country.- Returns:
- The country
-
setShippingCountry
Shipping address country.- Parameters:
shippingCountry
- The country
-
getShippingProvince
Short form of province for shipping address.- Returns:
- The province/state
-
setShippingProvince
Short form of province for shipping address.- Parameters:
shippingProvince
- The province/state
-
getShippingStreet
Shipping address street.- Returns:
- The address
-
setShippingStreet
Shipping address street.- Parameters:
shippingStreet
- The address
-
getShippingStreet2
Shipping address, second street info.- Returns:
- The address
-
setShippingStreet2
Shipping address, second street info.- Parameters:
shippingStreet2
- The address
-
getUserId
public long getUserId()Duplicate of id- Returns:
- The id
-
getVatName
Get the "Value Added Tax" name- Returns:
- VAT name
-
setVatName
Set the "Value Added Tax" name- Parameters:
vatName
- VAT name
-
getVatNumber
Get the "Value Added Tax" number- Returns:
- VAT number
-
setVatNumber
Set the "Value Added Tax" number- Parameters:
vatNumber
- VAT number
-
getSignupDate
Get the signup time of the client.
Note: The API returns this data in UTC.- Returns:
- Signup time in UTC
-
getUpdated
Get the time of last modification to the client.
Note: The API returns this data in "US/Eastern", but it is converted to UTC.- Returns:
- Updated time in UTC
-
getVisState
Get the visibility state: active, deleted, or archived- Returns:
- Enum of the visibility state.
- See Also:
-
setVisState
Set the visibility state of the client.- Parameters:
visState
- VisState value- See Also:
-
getContent
Description copied from interface:ConvertibleContent
Return the objects values as a Map suitable to sending to FreshBooks in a POST or PUT request.- Specified by:
getContent
in interfaceConvertibleContent
- Returns:
-