Skip to content

Commit

Permalink
Merge pull request #227 from teamforus/release/v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Visser authored Aug 6, 2020
2 parents ee30bd0 + 1ab0438 commit 5846f51
Show file tree
Hide file tree
Showing 176 changed files with 5,964 additions and 783 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ buildscript {
classpath 'me.tatarka:gradle-retrolambda:3.2.3'
classpath 'io.fabric.tools:gradle:1.25.4'
classpath 'com.google.gms:google-services:4.0.1'

}
}

Expand All @@ -37,9 +38,9 @@ allprojects {
jcenter()
}
ext {
androidVersionCode = 4
androidVersionName = "0.1.0"
androidBuildNumber = 2
androidVersionCode = 14
androidVersionName = "0.4.0"
androidBuildNumber = 1
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
testApplicationId = 'io.forus.me.test'
}
Expand Down
10 changes: 8 additions & 2 deletions buildsystem/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext {
//Android
androidBuildToolsVersion = "28.0.3"
androidMinSdkVersion = 18
androidTargetSdkVersion = 26
androidTargetSdkVersion = 28
androidCompileSdkVersion = 28

//Libraries
Expand All @@ -25,6 +25,8 @@ ext {
circleIndicatorVersion = '1.2.2@aar'
materialDialogs = '0.9.6.0'
gooleMapsVersion = '16.0.0'
playCoreVersion = '1.7.2'
nav_version = '1.0.0'

//Testing
robolectricVersion = '3.1.1'
Expand Down Expand Up @@ -53,6 +55,7 @@ ext {
firebaseCoreVersion='16.0.1'
firebaseCloudMessageVersion='17.3.3'


//Development
leakCanaryVersion = '1.3.1'
qrReaderVersion='2.0.3@aar'
Expand Down Expand Up @@ -97,7 +100,10 @@ ext {
fabric: "com.crashlytics.sdk.android:crashlytics:${rootProject.fabric}",
firebaseCore: "com.google.firebase:firebase-core:${rootProject.firebaseCoreVersion}",
firebaseMessaging: "com.google.firebase:firebase-messaging:${rootProject.firebaseCloudMessageVersion}",
googleMaps: "com.google.android.gms:play-services-maps:${rootProject.gooleMapsVersion}"
googleMaps: "com.google.android.gms:play-services-maps:${rootProject.gooleMapsVersion}",
playCore: "com.google.android.play:core:${rootProject.playCoreVersion}",
navigationFragment: "android.arch.navigation:navigation-fragment-ktx:${nav_version}",
navigationUI: "android.arch.navigation:navigation-ui-ktx:${nav_version}"

]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.forus.me.android.data.entity.records.request;

import com.google.gson.annotations.SerializedName;

public class ValidateRecord {

@SerializedName("organization_id")
private Long organization_id;

public ValidateRecord(Long organization_id) {
this.organization_id = organization_id;
}

public Long getOrganization_id() {
return organization_id;
}

public void setOrganization_id(Long organization_id) {
this.organization_id = organization_id;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.gson.annotations.SerializedName;

import java.util.Date;
import java.util.List;

import io.forus.me.android.data.entity.validators.response.Organization;

Expand Down Expand Up @@ -39,9 +40,13 @@ public enum State {
@SerializedName("organization")
private Organization organization;

@SerializedName("organizations_available")
private List<ValidatorOrganization> organizationsAvailable;

public Validation() { }

public Validation(State state, String identityAddress, Date createdAt, Date updatedAt, String uuid, String value, String key, String name, Organization organization) {
public Validation(State state, String identityAddress, Date createdAt, Date updatedAt, String uuid, String value, String key, String name, Organization organization/*,
ValidatorOrganization organizationsAvailable*/) {
this.state = state;
this.identityAddress = identityAddress;
this.createdAt = createdAt;
Expand All @@ -51,6 +56,7 @@ public Validation(State state, String identityAddress, Date createdAt, Date upda
this.key = key;
this.name = name;
this.organization = organization;
// this.organizationsAvailable = organizationsAvailable;
}

public State getState() {
Expand Down Expand Up @@ -124,4 +130,9 @@ public Organization getOrganization() {
public void setOrganization(Organization organization) {
this.organization = organization;
}


public List<ValidatorOrganization> getValidators() {
return organizationsAvailable;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package io.forus.me.android.data.entity.records.response;

import com.google.gson.annotations.SerializedName;

/**
* Created by maestrovs on 29.04.2020.
*/
public class ValidatorOrganization {

@SerializedName("id")
private Long id;

@SerializedName("name")
private String name;


public ValidatorOrganization(Long id, String name) {
this.id = id;
this.name = name;
}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.forus.me.android.data.entity.vouchers.response;

import android.util.Log;

import com.google.gson.annotations.SerializedName;

import java.math.BigDecimal;
Expand Down Expand Up @@ -27,6 +29,9 @@ public enum Type {
@SerializedName("created_at_locale")
private String createdAtLocale;

@SerializedName("expired")
private boolean expired;

@SerializedName("expire_at_locale")
private String expireAtLocale;

Expand Down Expand Up @@ -65,12 +70,16 @@ public enum Type {

public Voucher() { }

public Voucher(Long fundId, String identityAddress, String address, Date createdAt, String createdAtLocale, String expireAtLocale, Long timestamp, Type type, Product product, BigDecimal amount, Fund fund, List<Transaction> transactions, List<Organization> allowedOrganizations, List<ProductCategory> allowedProductCategories, List<Product> allowedProducts, List<Voucher> childVouchers, List<Office> offices) {
public Voucher(Long fundId, String identityAddress, String address, Date createdAt, String createdAtLocale,
boolean expired, String expireAtLocale, Long timestamp, Type type, Product product, BigDecimal amount,
Fund fund, List<Transaction> transactions, List<Organization> allowedOrganizations, List<ProductCategory> allowedProductCategories,
List<Product> allowedProducts, List<Voucher> childVouchers, List<Office> offices) {
this.fundId = fundId;
this.identityAddress = identityAddress;
this.address = address;
this.createdAt = createdAt;
this.createdAtLocale = createdAtLocale;
this.expired = expired;
this.expireAtLocale = expireAtLocale;
this.timestamp = timestamp;
this.type = type;
Expand Down Expand Up @@ -126,6 +135,8 @@ public void setCreatedAtLocale(String createdAtLocale) {
}

public String getExpireAtLocale() {

Log.d("forus","expire_at_locate="+expireAtLocale);
return expireAtLocale;
}

Expand Down Expand Up @@ -220,4 +231,12 @@ public List<Office> getOffices() {
public void setOffices(List<Office> offices) {
this.offices = offices;
}

public boolean isExpired() {
return expired;
}

public void setExpired(boolean expired) {
this.expired = expired;
}
}
Loading

0 comments on commit 5846f51

Please sign in to comment.