Skip to content

Commit

Permalink
release: 2.3 Hotfix 1 リリース (#43)
Browse files Browse the repository at this point in the history
* Fix: 従量制プランに対応 (#39)

* chore: リリース準備

* fix: ギガプラン暫定対応 (#42)
  • Loading branch information
pakutoma authored May 1, 2021
1 parent d188fb5 commit 0d801c5
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 17 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
applicationId "pakutoma.iijmiocouponwidget"
minSdkVersion 21
versionCode 7
versionName "2.3"
versionCode 8
versionName "2.3 Hotfix 1"
targetSdkVersion 30
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ class CouponAPI constructor(developerID: String, accessToken: String) {
-> convertNormalData(it)
"Eco Minimum", "Eco Standard", "Pay as you go"
-> convertEcoData(it)
null // TODO: remove null if api returns "giga plan"
-> convertNormalData(it)
else
-> throw UndefinedPlanException("Undefined plan name")
}
Expand All @@ -104,7 +106,7 @@ class CouponAPI constructor(developerID: String, accessToken: String) {

private fun convertNormalData(normalInfo: CouponInfoFromJson): PlanInfo {
val serviceCode = normalInfo.hddServiceCode
val plan = normalInfo.plan
val plan = normalInfo.plan ?: "unknown plan"
val lineInfoList = ArrayList<LineInfo>()
lineInfoList.addAll(normalInfo.hdoInfo?.map {
LineInfo(
Expand Down Expand Up @@ -133,7 +135,7 @@ class CouponAPI constructor(developerID: String, accessToken: String) {

private fun convertEcoData(ecoInfo: CouponInfoFromJson): PlanInfo {
val serviceCode = ecoInfo.hddServiceCode
val plan = ecoInfo.plan
val plan = ecoInfo.plan ?: "unknown plan"
val remains = ecoInfo.remains!!
val lineInfoList = ArrayList<LineInfo>()
lineInfoList.addAll(ecoInfo.hduInfo?.map {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data class CouponDataFromJson(

data class CouponInfoFromJson(
val hddServiceCode: String,
val plan: String,
val plan: String?,
val hdoInfo: List<HdoInfoFromJson>?,
val hduInfo: List<HduInfoFromJson>?,
val coupon: List<CouponFromJson>?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.junit.Assert.*
* Created by PAKUTOMA on 2018/02/21.
*/
class CouponAPITest {
private val accessToken = "HfXcx3zYSrG3ukkQtZjsQATkqX191aw1553251721"
private val accessToken = "fGVZ6pBQwQ8lEXiReGX26tIh2DEtaVy1619862654"
private val developerID = "IilCI1xrAgqKrXV9Zt4"
@Test
fun fetchCouponInfo() {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Mar 21 15:51:22 JST 2019
#Sun Oct 04 16:31:46 JST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

0 comments on commit 0d801c5

Please sign in to comment.