sjbillingclient 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. sjbillingclient-0.1.2/PKG-INFO +29 -0
  2. sjbillingclient-0.1.2/README.md +13 -0
  3. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/pyproject.toml +2 -2
  4. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/tools/__init__.py +9 -4
  5. sjbillingclient-0.1.0/PKG-INFO +0 -13
  6. sjbillingclient-0.1.0/README.md +0 -1
  7. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/__init__.py +0 -0
  8. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jclass/__init__.py +0 -0
  9. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jclass/acknowledge.py +0 -0
  10. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jclass/billing.py +0 -0
  11. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jclass/consume.py +0 -0
  12. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jclass/purchase.py +0 -0
  13. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jclass/queryproduct.py +0 -0
  14. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jinterface/__init__.py +0 -0
  15. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jinterface/acknowledge.py +0 -0
  16. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jinterface/billing.py +0 -0
  17. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jinterface/consume.py +0 -0
  18. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jinterface/product.py +0 -0
  19. {sjbillingclient-0.1.0 → sjbillingclient-0.1.2}/sjbillingclient/jinterface/purchases.py +0 -0
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.1
2
+ Name: sjbillingclient
3
+ Version: 0.1.2
4
+ Summary:
5
+ Author: Kenechukwu Akubue
6
+ Author-email: kengoon19@gmail.com
7
+ Requires-Python: >=3.9,<4.0
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Requires-Dist: pyjnius (>=1.6.1,<2.0.0)
14
+ Description-Content-Type: text/markdown
15
+
16
+ # SJBillingClient (Google Play Billing SDK for Python)
17
+
18
+
19
+ ## Installation
20
+ ```shell
21
+ # pip
22
+
23
+ pip install sjbillingclient
24
+
25
+ # buildozer
26
+ requirements=sjbillingclient
27
+ android.gradle_dependencies=com.android.billingclient:billing:7.1.1
28
+ ```
29
+
@@ -0,0 +1,13 @@
1
+ # SJBillingClient (Google Play Billing SDK for Python)
2
+
3
+
4
+ ## Installation
5
+ ```shell
6
+ # pip
7
+
8
+ pip install sjbillingclient
9
+
10
+ # buildozer
11
+ requirements=sjbillingclient
12
+ android.gradle_dependencies=com.android.billingclient:billing:7.1.1
13
+ ```
@@ -1,12 +1,12 @@
1
1
  [tool.poetry]
2
2
  name = "sjbillingclient"
3
- version = "0.1.0"
3
+ version = "0.1.2"
4
4
  description = ""
5
5
  authors = ["Kenechukwu Akubue <kengoon19@gmail.com>"]
6
6
  readme = "README.md"
7
7
 
8
8
  [tool.poetry.dependencies]
9
- python = "^3.13"
9
+ python = "^3.9"
10
10
  pyjnius = "^1.6.1"
11
11
 
12
12
 
@@ -37,6 +37,9 @@ class BillingClient:
37
37
  )
38
38
  self.__billing_client.startConnection(self.__billing_client_state_listener)
39
39
 
40
+ def end_connection(self):
41
+ self.__billing_client.endConnection()
42
+
40
43
  def query_product_details_async(self, product_type, products_ids: list, on_product_details_response):
41
44
  List = autoclass("java.util.List")
42
45
  queryProductDetailsParams = (
@@ -44,9 +47,9 @@ class BillingClient:
44
47
  .setProductList(
45
48
  List.of(*[
46
49
  QueryProductDetailsParamsProduct.newBuilder()
47
- .setProductId(product_id)
48
- .setProductType(product_type)
49
- .build()
50
+ .setProductId(product_id)
51
+ .setProductType(product_type)
52
+ .build()
50
53
  for product_id in products_ids
51
54
  ])
52
55
  )
@@ -66,8 +69,9 @@ class BillingClient:
66
69
  if product_type == ProductType.SUBS:
67
70
  offer_details = product_details.getSubscriptionOfferDetails()
68
71
  for offer in offer_details:
69
- pricing_phase = offer.getPricingPhase().getPricingPhaseList().get(0)
72
+ pricing_phase = offer.getPricingPhases().getPricingPhaseList().get(0)
70
73
  details.append({
74
+ "product_id": product_details.getProductId(),
71
75
  "formatted_price": pricing_phase.getFormattedPrice(),
72
76
  "price_amount_micros": pricing_phase.getPriceAmountMicros,
73
77
  "price_currency_code": pricing_phase.getPriceCurrencyCode(),
@@ -76,6 +80,7 @@ class BillingClient:
76
80
  elif product_type == ProductType.INAPP:
77
81
  offer_details = product_details.getOneTimePurchaseOfferDetails()
78
82
  details.append({
83
+ "product_id": product_details.getProductId(),
79
84
  "formatted_price": offer_details.getFormattedPrice(),
80
85
  "price_amount_micros": offer_details.getPriceAmountMicros,
81
86
  "price_currency_code": offer_details.getPriceCurrencyCode(),
@@ -1,13 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: sjbillingclient
3
- Version: 0.1.0
4
- Summary:
5
- Author: Kenechukwu Akubue
6
- Author-email: kengoon19@gmail.com
7
- Requires-Python: >=3.13,<4.0
8
- Classifier: Programming Language :: Python :: 3
9
- Requires-Dist: pyjnius (>=1.6.1,<2.0.0)
10
- Description-Content-Type: text/markdown
11
-
12
- # SJBillingClient (Google Play Billing SDK for Python)
13
-
@@ -1 +0,0 @@
1
- # SJBillingClient (Google Play Billing SDK for Python)