001package com.plivo.api.models.identity;
002
003import com.plivo.api.models.base.Creator;
004import retrofit2.Call;
005
006import java.time.LocalDate;
007import java.time.format.DateTimeFormatter;
008
009public class IdentityCreator extends Creator<IdentityCreateResponse> {
010
011  private String countryIso;
012  private String alias;
013  private String salutation;
014  private String firstName;
015  private String lastName;
016  private String birthPlace;
017  private String birthDate;
018  private String nationality;
019  private String idNationality;
020  private String idIssueDate;
021  private String businessName;
022  private String idType;
023  private String idNumber;
024  private String addressLine1;
025  private String addressLine2;
026  private String city;
027  private String region;
028  private String postalCode;
029  private String fiscalIdentificationCode;
030  private String streetCode;
031  private String municipalCode;
032  private String subaccount;
033  private String file;
034
035  public IdentityCreator(String countryIso, String salutation, String firstName, String lastName,
036                         String birthPlace, LocalDate birthDate, String nationality, String idNationality,
037                         LocalDate idIssueDate, String businessName, String idType, String idNumber,
038                         String addressLine1, String addressLine2, String city, String region, String postalCode ){
039    this.countryIso = countryIso;
040    this.salutation = salutation;
041    this.firstName = firstName;
042    this.lastName = lastName;
043    this.birthPlace = birthPlace;
044    this.birthDate = birthDate.format(DateTimeFormatter.ISO_DATE);
045    this.nationality = nationality;
046    this.idNationality = idNationality;
047    this.idIssueDate = idIssueDate.format(DateTimeFormatter.ISO_DATE);;
048    this.businessName = businessName;
049    this.idType = idType;
050    this.idNumber = idNumber;
051    this.addressLine1 = addressLine1;
052    this.addressLine2 = addressLine2;
053    this.city = city;
054    this.region = region;
055    this.postalCode = postalCode;
056  }
057
058  public String countryIso() {
059    return countryIso;
060  }
061
062  public String salutation() {
063    return salutation;
064  }
065
066  public String firstName() {
067    return firstName;
068  }
069
070  public String lastName() {
071    return lastName;
072  }
073
074  public String birthPlace() {
075    return birthPlace;
076  }
077
078  public String birthDate() {
079    return birthDate;
080  }
081
082  public String nationality() {
083    return nationality;
084  }
085
086  public String idNationality() {
087    return idNationality;
088  }
089
090  public String idIssueDate() {
091    return idIssueDate;
092  }
093
094  public String businessName() {
095    return businessName;
096  }
097
098  public String idType() {
099    return idType;
100  }
101
102  public String idNumber() {
103    return idNumber;
104  }
105
106  public String addressLine1() {
107    return addressLine1;
108  }
109
110  public String addressLine2() {
111    return addressLine2;
112  }
113
114  public String city() {
115    return city;
116  }
117
118  public String region() {
119    return region;
120  }
121
122  public String postalCode() {
123    return postalCode;
124  }
125
126  public String fiscalIdentificationCode() {
127    return fiscalIdentificationCode;
128  }
129
130  public String streetCode() {
131    return streetCode;
132  }
133
134  public String municipalCode() {
135    return municipalCode;
136  }
137
138  public String subaccount() {
139    return subaccount;
140  }
141
142  public String file() {
143    return file;
144  }
145
146  public IdentityCreator alias( String alias ){
147    this.alias = alias;
148    return this;
149  }
150
151  public IdentityCreator countryIso( String countryIso ){
152    this.countryIso = countryIso;
153    return this;
154  }
155
156  public IdentityCreator salutation( String salutation ){
157    this.salutation = salutation;
158    return this;
159  }
160
161  public IdentityCreator firstName( String firstName ){
162    this.firstName = firstName;
163    return this;
164  }
165
166  public IdentityCreator lastName( String lastName ){
167    this.lastName = lastName;
168    return this;
169  }
170
171  public IdentityCreator birthPlace( String birthPlace ){
172    this.birthPlace = birthPlace;
173    return this;
174  }
175
176  public IdentityCreator birthDate( String birthDate ){
177    this.birthDate = birthDate;
178    return this;
179  }
180
181  public IdentityCreator nationality( String nationality ){
182    this.nationality = nationality;
183    return this;
184  }
185
186  public IdentityCreator idNationality( String idNationality ){
187    this.idNationality = idNationality;
188    return this;
189  }
190
191  public IdentityCreator idIssueDate( String idIssueDate ){
192    this.idIssueDate = idIssueDate;
193    return this;
194  }
195
196  public IdentityCreator businessName( String businessName ){
197    this.businessName = businessName;
198    return this;
199  }
200
201  public IdentityCreator idType( String idType ){
202    this.idType = idType;
203    return this;
204  }
205
206  public IdentityCreator idNumber( String idNumber ){
207    this.idNumber = idNumber;
208    return this;
209  }
210
211  public IdentityCreator addressLine1( String addressLine1 ){
212    this.addressLine1 = addressLine1;
213    return this;
214  }
215
216  public IdentityCreator addressLine2( String addressLine2 ){
217    this.addressLine2 = addressLine2;
218    return this;
219  }
220
221  public IdentityCreator city( String city ){
222    this.city = city;
223    return this;
224  }
225
226  public IdentityCreator region( String region ){
227    this.region = region;
228    return this;
229  }
230
231  public IdentityCreator postalCode( String postalCode ){
232    this.postalCode = postalCode;
233    return this;
234  }
235
236  public IdentityCreator fiscalIdentificationCode( String fiscalIdentificationCode ){
237    this.fiscalIdentificationCode = fiscalIdentificationCode;
238    return this;
239  }
240
241  public IdentityCreator streetCode( String streetCode ){
242    this.streetCode = streetCode;
243    return this;
244  }
245
246  public IdentityCreator municipalCode( String municipalCode ){
247    this.municipalCode = municipalCode;
248    return this;
249  }
250
251  public IdentityCreator subaccount( String subaccount ){
252    this.subaccount = subaccount;
253    return this;
254  }
255
256  public IdentityCreator file( String file ){
257    this.file = file;
258    return this;
259  }
260
261  @Override
262  protected Call<IdentityCreateResponse> obtainCall() {
263    return client().getApiService().identityCreate(client().getAuthId(), this);
264  }
265}