diff --git a/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md index 1a03ba27feb7..7a998d0547de 100644 --- a/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md +++ b/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.4+7 + +* Ensure that the `SkuDetailsWrapper.introductoryPriceMicros` is populated correctly. + ## 0.1.4+6 * Ensure that purchases correctly indicate whether they are acknowledged or not. The `PurchaseDetails.pendingCompletePurchase` field now correctly indicates if the purchase still needs to be completed. diff --git a/packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/sku_details_wrapper.dart b/packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/sku_details_wrapper.dart index 5bbe7504783d..9c349badbb04 100644 --- a/packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/sku_details_wrapper.dart +++ b/packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/sku_details_wrapper.dart @@ -68,7 +68,7 @@ class SkuDetailsWrapper { final String introductoryPrice; /// [introductoryPrice] in micro-units 990000 - @JsonKey(defaultValue: '') + @JsonKey(name: 'introductoryPriceAmountMicros', defaultValue: '') final String introductoryPriceMicros; /// The number of subscription billing periods for which the user will be given the introductory price, such as 3. diff --git a/packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/sku_details_wrapper.g.dart b/packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/sku_details_wrapper.g.dart index 49e86087bc13..d21f832a2de6 100644 --- a/packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/sku_details_wrapper.g.dart +++ b/packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/sku_details_wrapper.g.dart @@ -11,7 +11,8 @@ SkuDetailsWrapper _$SkuDetailsWrapperFromJson(Map json) { description: json['description'] as String? ?? '', freeTrialPeriod: json['freeTrialPeriod'] as String? ?? '', introductoryPrice: json['introductoryPrice'] as String? ?? '', - introductoryPriceMicros: json['introductoryPriceMicros'] as String? ?? '', + introductoryPriceMicros: + json['introductoryPriceAmountMicros'] as String? ?? '', introductoryPriceCycles: json['introductoryPriceCycles'] as int? ?? 0, introductoryPricePeriod: json['introductoryPricePeriod'] as String? ?? '', price: json['price'] as String? ?? '', @@ -32,7 +33,7 @@ Map _$SkuDetailsWrapperToJson(SkuDetailsWrapper instance) => 'description': instance.description, 'freeTrialPeriod': instance.freeTrialPeriod, 'introductoryPrice': instance.introductoryPrice, - 'introductoryPriceMicros': instance.introductoryPriceMicros, + 'introductoryPriceAmountMicros': instance.introductoryPriceMicros, 'introductoryPriceCycles': instance.introductoryPriceCycles, 'introductoryPricePeriod': instance.introductoryPricePeriod, 'price': instance.price, diff --git a/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml b/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml index d9b09827824b..64a40889f375 100644 --- a/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml +++ b/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml @@ -2,7 +2,7 @@ name: in_app_purchase_android description: An implementation for the Android platform of the Flutter `in_app_purchase` plugin. This uses the Android BillingClient APIs. repository: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/in_app_purchase_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 0.1.4+6 +version: 0.1.4+7 environment: sdk: ">=2.12.0 <3.0.0" diff --git a/packages/in_app_purchase/in_app_purchase_android/test/billing_client_wrappers/sku_details_wrapper_test.dart b/packages/in_app_purchase/in_app_purchase_android/test/billing_client_wrappers/sku_details_wrapper_test.dart index b8ba9d5cc854..62d9104f3738 100644 --- a/packages/in_app_purchase/in_app_purchase_android/test/billing_client_wrappers/sku_details_wrapper_test.dart +++ b/packages/in_app_purchase/in_app_purchase_android/test/billing_client_wrappers/sku_details_wrapper_test.dart @@ -134,7 +134,7 @@ Map buildSkuMap(SkuDetailsWrapper original) { 'description': original.description, 'freeTrialPeriod': original.freeTrialPeriod, 'introductoryPrice': original.introductoryPrice, - 'introductoryPriceMicros': original.introductoryPriceMicros, + 'introductoryPriceAmountMicros': original.introductoryPriceMicros, 'introductoryPriceCycles': original.introductoryPriceCycles, 'introductoryPricePeriod': original.introductoryPricePeriod, 'price': original.price,