checkout-intents 0.8.0__py3-none-any.whl → 0.9.0__py3-none-any.whl

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.
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "checkout_intents"
4
- __version__ = "0.8.0" # x-release-please-version
4
+ __version__ = "0.9.0" # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: checkout-intents
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: The official Python library for the Checkout Intents API
5
5
  Project-URL: Homepage, https://github.com/rye-com/checkout-intents-python
6
6
  Project-URL: Repository, https://github.com/rye-com/checkout-intents-python
@@ -69,7 +69,7 @@ client = CheckoutIntents(
69
69
  environment="production",
70
70
  )
71
71
 
72
- checkout_intent = client.checkout_intents.create(
72
+ checkout_intent = client.checkout_intents.purchase(
73
73
  buyer={
74
74
  "address1": "123 Main St",
75
75
  "city": "New York",
@@ -81,6 +81,10 @@ checkout_intent = client.checkout_intents.create(
81
81
  "postal_code": "10001",
82
82
  "province": "NY",
83
83
  },
84
+ payment_method={
85
+ "stripe_token": "tok_visa",
86
+ "type": "stripe_token",
87
+ },
84
88
  product_url="https://rye-protocol.myshopify.com/products/rye-sticker",
85
89
  quantity=1,
86
90
  )
@@ -200,7 +204,7 @@ client = AsyncCheckoutIntents(
200
204
 
201
205
 
202
206
  async def main() -> None:
203
- checkout_intent = await client.checkout_intents.create(
207
+ checkout_intent = await client.checkout_intents.purchase(
204
208
  buyer={
205
209
  "address1": "123 Main St",
206
210
  "city": "New York",
@@ -212,6 +216,10 @@ async def main() -> None:
212
216
  "postal_code": "10001",
213
217
  "province": "NY",
214
218
  },
219
+ payment_method={
220
+ "stripe_token": "tok_visa",
221
+ "type": "stripe_token",
222
+ },
215
223
  product_url="https://rye-protocol.myshopify.com/products/rye-sticker",
216
224
  quantity=1,
217
225
  )
@@ -249,7 +257,7 @@ async def main() -> None:
249
257
  ), # This is the default and can be omitted
250
258
  http_client=DefaultAioHttpClient(),
251
259
  ) as client:
252
- checkout_intent = await client.checkout_intents.create(
260
+ checkout_intent = await client.checkout_intents.purchase(
253
261
  buyer={
254
262
  "address1": "123 Main St",
255
263
  "city": "New York",
@@ -261,6 +269,10 @@ async def main() -> None:
261
269
  "postal_code": "10001",
262
270
  "province": "NY",
263
271
  },
272
+ payment_method={
273
+ "stripe_token": "tok_visa",
274
+ "type": "stripe_token",
275
+ },
264
276
  product_url="https://rye-protocol.myshopify.com/products/rye-sticker",
265
277
  quantity=1,
266
278
  )
@@ -358,7 +370,7 @@ from checkout_intents import CheckoutIntents
358
370
 
359
371
  client = CheckoutIntents()
360
372
 
361
- checkout_intent = client.checkout_intents.create(
373
+ checkout_intent = client.checkout_intents.purchase(
362
374
  buyer={
363
375
  "address1": "123 Main St",
364
376
  "city": "New York",
@@ -370,6 +382,10 @@ checkout_intent = client.checkout_intents.create(
370
382
  "postal_code": "10001",
371
383
  "province": "NY",
372
384
  },
385
+ payment_method={
386
+ "stripe_token": "tok_1RkrWWHGDlstla3f1Fc7ZrhH",
387
+ "type": "stripe_token",
388
+ },
373
389
  product_url="productUrl",
374
390
  quantity=1,
375
391
  )
@@ -392,7 +408,7 @@ from checkout_intents import CheckoutIntents
392
408
  client = CheckoutIntents()
393
409
 
394
410
  try:
395
- client.checkout_intents.create(
411
+ client.checkout_intents.purchase(
396
412
  buyer={
397
413
  "address1": "123 Main St",
398
414
  "city": "New York",
@@ -404,6 +420,10 @@ try:
404
420
  "postal_code": "10001",
405
421
  "province": "NY",
406
422
  },
423
+ payment_method={
424
+ "stripe_token": "tok_visa",
425
+ "type": "stripe_token",
426
+ },
407
427
  product_url="https://rye-protocol.myshopify.com/products/rye-sticker",
408
428
  quantity=1,
409
429
  )
@@ -469,7 +489,7 @@ client = CheckoutIntents(
469
489
  )
470
490
 
471
491
  # Or, configure per-request:
472
- client.with_options(max_retries=5).checkout_intents.create(
492
+ client.with_options(max_retries=5).checkout_intents.purchase(
473
493
  buyer={
474
494
  "address1": "123 Main St",
475
495
  "city": "New York",
@@ -481,6 +501,10 @@ client.with_options(max_retries=5).checkout_intents.create(
481
501
  "postal_code": "10001",
482
502
  "province": "NY",
483
503
  },
504
+ payment_method={
505
+ "stripe_token": "tok_visa",
506
+ "type": "stripe_token",
507
+ },
484
508
  product_url="https://rye-protocol.myshopify.com/products/rye-sticker",
485
509
  quantity=1,
486
510
  )
@@ -506,7 +530,7 @@ client = CheckoutIntents(
506
530
  )
507
531
 
508
532
  # Override per-request:
509
- client.with_options(timeout=5.0).checkout_intents.create(
533
+ client.with_options(timeout=5.0).checkout_intents.purchase(
510
534
  buyer={
511
535
  "address1": "123 Main St",
512
536
  "city": "New York",
@@ -518,6 +542,10 @@ client.with_options(timeout=5.0).checkout_intents.create(
518
542
  "postal_code": "10001",
519
543
  "province": "NY",
520
544
  },
545
+ payment_method={
546
+ "stripe_token": "tok_visa",
547
+ "type": "stripe_token",
548
+ },
521
549
  product_url="https://rye-protocol.myshopify.com/products/rye-sticker",
522
550
  quantity=1,
523
551
  )
@@ -561,7 +589,7 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
561
589
  from checkout_intents import CheckoutIntents
562
590
 
563
591
  client = CheckoutIntents()
564
- response = client.checkout_intents.with_raw_response.create(
592
+ response = client.checkout_intents.with_raw_response.purchase(
565
593
  buyer={
566
594
  "address1": "123 Main St",
567
595
  "city": "New York",
@@ -573,12 +601,16 @@ response = client.checkout_intents.with_raw_response.create(
573
601
  "postal_code": "10001",
574
602
  "province": "NY",
575
603
  },
604
+ payment_method={
605
+ "stripe_token": "tok_visa",
606
+ "type": "stripe_token",
607
+ },
576
608
  product_url="https://rye-protocol.myshopify.com/products/rye-sticker",
577
609
  quantity=1,
578
610
  )
579
611
  print(response.headers.get('X-My-Header'))
580
612
 
581
- checkout_intent = response.parse() # get the object that `checkout_intents.create()` would have returned
613
+ checkout_intent = response.parse() # get the object that `checkout_intents.purchase()` would have returned
582
614
  print(checkout_intent)
583
615
  ```
584
616
 
@@ -593,7 +625,7 @@ The above interface eagerly reads the full response body when you make the reque
593
625
  To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
594
626
 
595
627
  ```python
596
- with client.checkout_intents.with_streaming_response.create(
628
+ with client.checkout_intents.with_streaming_response.purchase(
597
629
  buyer={
598
630
  "address1": "123 Main St",
599
631
  "city": "New York",
@@ -605,6 +637,10 @@ with client.checkout_intents.with_streaming_response.create(
605
637
  "postal_code": "10001",
606
638
  "province": "NY",
607
639
  },
640
+ payment_method={
641
+ "stripe_token": "tok_visa",
642
+ "type": "stripe_token",
643
+ },
608
644
  product_url="https://rye-protocol.myshopify.com/products/rye-sticker",
609
645
  quantity=1,
610
646
  ) as response:
@@ -11,7 +11,7 @@ checkout_intents/_resource.py,sha256=X-eWffEBAgzTZvakLqNUjwgidMKfBFRmCeeOiuko4lg
11
11
  checkout_intents/_response.py,sha256=sLqxWBxzmVqPsdr2x5z6d87h8jb1U-Huvh2YFg-U6nE,28876
12
12
  checkout_intents/_streaming.py,sha256=y8SjBVAw2SDdVczQsP1T3dufnx4040C5fQqz-jGSvmg,10257
13
13
  checkout_intents/_types.py,sha256=PTRxqWPBW57h6JvfwcVuR42gIMpY4nwSZbqAtv85Ado,7305
14
- checkout_intents/_version.py,sha256=0ybsLG45CN7PEjra6-lyyHz61nUb1wGJELezxMfZsns,168
14
+ checkout_intents/_version.py,sha256=PprqsKyOgvzP25SDKE6EvLaOv0CXi5Iznh9kfIZFQcM,168
15
15
  checkout_intents/pagination.py,sha256=VMe3ftq-qqAku2ERRTOz7iZOoMQ_KKp2HIUl_I8oAXE,2908
16
16
  checkout_intents/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  checkout_intents/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
@@ -47,7 +47,7 @@ checkout_intents/types/payment_method.py,sha256=-v5-L5RPojm8IDrdAhIMGmhVb89vwqT1
47
47
  checkout_intents/types/payment_method_param.py,sha256=_yzwZ5nw7bStK4U2-1ybtpjdJz5funCOMN7MALtF0xk,1225
48
48
  checkout_intents/types/variant_selection.py,sha256=y6mlU-qGwDfE77mU-x1GTXkDsmn6vuPpy5lBYXqXCBw,259
49
49
  checkout_intents/types/variant_selection_param.py,sha256=ahwTmDVIUMV8jvpggEo2jDUTIm9xvXbntDxmIZqT2_k,355
50
- checkout_intents-0.8.0.dist-info/METADATA,sha256=UGTPqGdeixx8wID3A1Q-GjsgO6ERLWGEYxx5UjhNMrc,23781
51
- checkout_intents-0.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
52
- checkout_intents-0.8.0.dist-info/licenses/LICENSE,sha256=dRDmL6lFnLaphTaman8kAc21qY1IQ_qsAETk1F-b6jY,1056
53
- checkout_intents-0.8.0.dist-info/RECORD,,
50
+ checkout_intents-0.9.0.dist-info/METADATA,sha256=YefXWCLHIhjrvpzN5tCqy9A6K4zZ5qnYpKViu6yhO-U,24749
51
+ checkout_intents-0.9.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
52
+ checkout_intents-0.9.0.dist-info/licenses/LICENSE,sha256=dRDmL6lFnLaphTaman8kAc21qY1IQ_qsAETk1F-b6jY,1056
53
+ checkout_intents-0.9.0.dist-info/RECORD,,