-
- All Implemented Interfaces:
public class BillingAddress.Builder
-
-
Method Summary
Modifier and Type Method Description BillingAddress.Builder
setCountry(@Nullable() String country)
Sets the country. BillingAddress.Builder
setState(@Nullable() String state)
Sets the state. BillingAddress.Builder
setCity(@Nullable() String city)
Sets the city. BillingAddress.Builder
setPostCode(@Nullable() String postCode)
Sets the postal code. BillingAddress.Builder
setStreet1(@Nullable() String street1)
Sets the street 1. BillingAddress.Builder
setStreet2(@Nullable() String street2)
Sets the street2. BillingAddress.Builder
setCountryRequired(@Nullable() Boolean countryRequired)
Sets if country is required, default value is true
.BillingAddress.Builder
setStateRequired(@Nullable() Boolean stateRequired)
Sets if state is required, default value is true
.BillingAddress.Builder
setCityRequired(@Nullable() Boolean cityRequired)
Sets if city is required, default value is true
.BillingAddress.Builder
setPostCodeRequired(@Nullable() Boolean postCodeRequired)
Sets if postal code is required, default value is true
.BillingAddress.Builder
setStreet1Required(@Nullable() Boolean street1Required)
Sets if street1 is required, default value is true
.BillingAddress.Builder
setStreet2Required(@Nullable() Boolean street2Required)
Sets if street2 is required, default value is false
.BillingAddress
build()
Creates a new billing address. -
-
Method Detail
-
setCountry
@NonNull() BillingAddress.Builder setCountry(@Nullable() String country)
Sets the country.
- Parameters:
country
- The country of the billing address (ISO 3166-1).
-
setState
@NonNull() BillingAddress.Builder setState(@Nullable() String state)
Sets the state.
- Parameters:
state
- The county, state or region of the billing address.
-
setCity
@NonNull() BillingAddress.Builder setCity(@Nullable() String city)
Sets the city.
- Parameters:
city
- The town, district or city of the billing address.
-
setPostCode
@NonNull() BillingAddress.Builder setPostCode(@Nullable() String postCode)
Sets the postal code.
- Parameters:
postCode
- the postal code
-
setStreet1
@NonNull() BillingAddress.Builder setStreet1(@Nullable() String street1)
Sets the street 1.
- Parameters:
street1
- The door number, floor, building number, building name, and/or street name of the billing address.
-
setStreet2
@NonNull() BillingAddress.Builder setStreet2(@Nullable() String street2)
Sets the street2.
- Parameters:
street2
- The adjoining road or locality (if required) of the billing address.
-
setCountryRequired
@NonNull() BillingAddress.Builder setCountryRequired(@Nullable() Boolean countryRequired)
Sets if country is required, default value is
true
.- Parameters:
countryRequired
-true
if country is required, otherwisefalse
-
setStateRequired
@NonNull() BillingAddress.Builder setStateRequired(@Nullable() Boolean stateRequired)
Sets if state is required, default value is
true
.- Parameters:
stateRequired
-true
if state is required, otherwisefalse
-
setCityRequired
@NonNull() BillingAddress.Builder setCityRequired(@Nullable() Boolean cityRequired)
Sets if city is required, default value is
true
.- Parameters:
cityRequired
-true
if city is required, otherwisefalse
-
setPostCodeRequired
@NonNull() BillingAddress.Builder setPostCodeRequired(@Nullable() Boolean postCodeRequired)
Sets if postal code is required, default value is
true
.- Parameters:
postCodeRequired
-true
if postal code is required, otherwisefalse
-
setStreet1Required
@NonNull() BillingAddress.Builder setStreet1Required(@Nullable() Boolean street1Required)
Sets if street1 is required, default value is
true
.- Parameters:
street1Required
-true
if street1 is required, otherwisefalse
-
setStreet2Required
@NonNull() BillingAddress.Builder setStreet2Required(@Nullable() Boolean street2Required)
Sets if street2 is required, default value is
false
.- Parameters:
street2Required
-true
if street2 is required, otherwisefalse
-
build
@NonNull() BillingAddress build()
Creates a new billing address.
-
-
-
-