@Test public void fromJsonString_toMap_createsExpectedMap() { assertMapEquals(EXAMPLE_MAP_REDIRECT, mSourceRedirect.toMap()); }
@NonNull @Override public Map<String, Object> toMap() { Map<String, Object> hashMap = new HashMap<>(); hashMap.put(FIELD_RETURN_URL, mReturnUrl); hashMap.put(FIELD_STATUS, mStatus); hashMap.put(FIELD_URL, mUrl); removeNullAndEmptyParams(hashMap); return hashMap; }
SourceRedirect extends StripeJsonModel { @NonNull @Override public Map<String, Object> toMap() { Map<String, Object> hashMap = new HashMap<>(); hashMap.put(FIELD_RETURN_URL, mReturnUrl); hashMap.put(FIELD_STATUS, mStatus); hashMap.put(FIELD_URL, mUrl); removeNullAndEmptyParams(hashMap); return hashMap; } }
SourceRedirect extends StripeJsonModel { @NonNull @Override public Map<String, Object> toMap() { Map<String, Object> hashMap = new HashMap<>(); hashMap.put(FIELD_RETURN_URL, mReturnUrl); hashMap.put(FIELD_STATUS, mStatus); hashMap.put(FIELD_URL, mUrl); removeNullAndEmptyParams(hashMap); return hashMap; } SourceRedirect(String returnUrl, @Status String status, String url); }
SourceRedirect extends StripeJsonModel { @NonNull @Override public Map<String, Object> toMap() { Map<String, Object> hashMap = new HashMap<>(); hashMap.put(FIELD_RETURN_URL, mReturnUrl); hashMap.put(FIELD_STATUS, mStatus); hashMap.put(FIELD_URL, mUrl); removeNullAndEmptyParams(hashMap); return hashMap; } SourceRedirect(String returnUrl, @Status String status, String url); String getReturnUrl(); void setReturnUrl(String returnUrl); @Status String getStatus(); void setStatus(@Status String status); String getUrl(); void setUrl(String url); @NonNull @Override Map<String, Object> toMap(); @NonNull @Override JSONObject toJson(); @Nullable static SourceRedirect fromString(@Nullable String jsonString); @Nullable static SourceRedirect fromJson(@Nullable JSONObject jsonObject); }
SourceRedirect extends StripeJsonModel { @NonNull @Override public Map<String, Object> toMap() { Map<String, Object> hashMap = new HashMap<>(); hashMap.put(FIELD_RETURN_URL, mReturnUrl); hashMap.put(FIELD_STATUS, mStatus); hashMap.put(FIELD_URL, mUrl); removeNullAndEmptyParams(hashMap); return hashMap; } SourceRedirect(String returnUrl, @Status String status, String url); String getReturnUrl(); void setReturnUrl(String returnUrl); @Status String getStatus(); void setStatus(@Status String status); String getUrl(); void setUrl(String url); @NonNull @Override Map<String, Object> toMap(); @NonNull @Override JSONObject toJson(); @Nullable static SourceRedirect fromString(@Nullable String jsonString); @Nullable static SourceRedirect fromJson(@Nullable JSONObject jsonObject); static final String PENDING; static final String SUCCEEDED; static final String FAILED; }