forked from glim/rest-api-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall.py
More file actions
25 lines (23 loc) · 749 Bytes
/
all.py
File metadata and controls
25 lines (23 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# #GetPaymentList Sample
# This sample code demonstrate how you can
# retrieve a list of all Payment resources
# you've created using the Payments API.
# Note various query parameters that you can
# use to filter, and paginate through the
# payments list.
# API used: GET /v1/payments/payments
from paypalrestsdk import Payment
import logging
logging.basicConfig(level=logging.INFO)
# ###Retrieve
# Retrieve the PaymentHistory by calling the
# `all` method
# on the Payment class
# Refer the API documentation
# for valid values for keys
# Supported paramters are :count, :next_id
payment_history = Payment.all({"count": 2})
# List Payments
print("List Payment:")
for payment in payment_history.payments:
print(" -> Payment[%s]"%(payment.id))