-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from huttneab/assistant_params_2
add assistant info to json request
- Loading branch information
Showing
20 changed files
with
473 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/main/java/com/rockthevote/grommet/data/api/model/ApiRegistrationHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.rockthevote.grommet.data.api.model; | ||
|
||
import com.google.auto.value.AutoValue; | ||
import com.squareup.moshi.Json; | ||
import com.squareup.moshi.JsonAdapter; | ||
import com.squareup.moshi.Moshi; | ||
|
||
import java.util.List; | ||
|
||
@AutoValue | ||
public abstract class ApiRegistrationHelper { | ||
|
||
@Json(name = "registration_helper_type") | ||
public abstract String type(); | ||
|
||
public abstract ApiName name(); | ||
|
||
public abstract ApiAddress address(); | ||
|
||
@Json(name = "contact_methods") | ||
abstract List<ApiContactMethod> contactMethods(); | ||
|
||
|
||
public static JsonAdapter<ApiRegistrationHelper> jsonAdapter(Moshi moshi) { | ||
return new AutoValue_ApiRegistrationHelper.MoshiJsonAdapter(moshi); | ||
} | ||
|
||
public static Builder builder() { | ||
return new AutoValue_ApiRegistrationHelper.Builder() | ||
.type("assistant"); | ||
} | ||
|
||
@AutoValue.Builder | ||
public abstract static class Builder { | ||
|
||
public abstract Builder type(String type); | ||
|
||
public abstract Builder name(ApiName name); | ||
|
||
public abstract Builder address(ApiAddress address); | ||
|
||
public abstract Builder contactMethods(List<ApiContactMethod> contactMethods); | ||
|
||
public abstract ApiRegistrationHelper build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.