Skip to content

Commit 6ebb035

Browse files
committed
Remove deprecated endpoints
1 parent e5db87f commit 6ebb035

14 files changed

+36
-1010
lines changed

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2021 Aliaksandr Pliutau
3+
Copyright (c) 2024 Aliaksandr Pliutau
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+9-104
Original file line numberDiff line numberDiff line change
@@ -2,112 +2,13 @@
22

33
# Go client for PayPal REST API
44

5-
## Coverage
5+
## Paypal REST API Docs
66

7-
### Auth
7+
[Get started with PayPal REST APIs](https://developer.paypal.com/api/rest/)
88

9-
* POST /v1/oauth2/token
10-
11-
### /v1/payments
12-
13-
* POST /v1/payments/payouts
14-
* GET /v1/payments/payouts/:id
15-
* GET /v1/payments/payouts-item/:id
16-
* POST /v1/payments/payouts-item/:id/cancel
17-
* GET /v1/payments/sale/:id
18-
* POST /v1/payments/sale/:id/refund
19-
* GET /v1/payments/billing-plans
20-
* POST /v1/payments/billing-plans
21-
* PATCH /v1/payments/billing-plans/:id
22-
* POST /v1/payments/billing-agreements
23-
* POST /v1/payments/billing-agreements/:token/agreement-execute
24-
25-
### /v2/payments
26-
27-
* GET /v2/payments/authorizations/:id
28-
* GET /v2/payments/captures/:id
29-
* POST /v2/payments/authorizations/:id/capture
30-
* POST /v2/payments/authorizations/:id/void
31-
* POST /v2/payments/authorizations/:id/reauthorize
32-
* GET /v2/payments/refund/:id
33-
34-
### Identity
35-
* POST /v1/identity/openidconnect/tokenservice
36-
* GET /v1/identity/openidconnect/userinfo/?schema=:schema
37-
38-
### /v1/payment-experience
39-
40-
* GET /v1/payment-experience/web-profiles
41-
* POST /v1/payment-experience/web-profiles
42-
* GET /v1/payment-experience/web-profiles/:id
43-
* PUT /v1/payment-experience/web-profiles/:id
44-
* DELETE /v1/payment-experience/web-profiles/:id
45-
46-
### /v1/reporting
47-
48-
* POST /v1/reporting/transactions
49-
50-
### Vault
51-
52-
* POST /v1/vault/credit-cards
53-
* DELETE /v1/vault/credit-cards/:id
54-
* PATCH /v1/vault/credit-cards/:id
55-
* GET /v1/vault/credit-cards/:id
56-
* GET /v1/vault/credit-cards
57-
58-
### Checkout
59-
60-
* POST /v2/checkout/orders
61-
* GET /v2/checkout/orders/:id
62-
* PATCH /v2/checkout/orders/:id
63-
* POST /v2/checkout/orders/:id/authorize
64-
* POST /v2/checkout/orders/:id/capture
65-
66-
### Notifications
67-
* POST /v1/notifications/webhooks
68-
* GET /v1/notifications/webhooks
69-
* GET /v1/notifications/webhooks/:id
70-
* PATCH /v1/notifications/webhooks/:id
71-
* DELETE /v1/notifications/webhooks/:id
72-
* POST /v1/notifications/verify-webhook-signature
73-
74-
### Products (Catalog)
75-
76-
* POST /v1/catalogs/products
77-
* PATCH /v1/catalogs/products/:id
78-
* GET /v1/catalogs/products/:id
79-
* GET /v1/catalogs/products
80-
81-
### Billing Plans (Subscriptions)
82-
83-
* POST /v1/billing/plans
84-
* PATCH /v1/billing/plans/:id
85-
* GET /v1/billing/plans/:id
86-
* GET /v1/billing/plans
87-
* POST /v1/billing/plans/:id/activate
88-
* POST /v1/billing/plans/:id/deactivate
89-
* POST /v1/billing/plans/:id/update-pricing-schemes
90-
91-
### Subscriptions
92-
93-
* POST /v1/billing/subscriptions
94-
* PATCH /v1/billing/subscriptions/:id
95-
* GET /v1/billing/subscriptions/:id
96-
* POST /v1/billing/subscriptions/:id/activate
97-
* POST /v1/billing/subscriptions/:id/cancel
98-
* POST /v1/billing/subscriptions/:id/revise
99-
* POST /v1/billing/subscriptions/:id/capture
100-
* POST /v1/billing/subscriptions/:id/suspend
101-
* GET /v1/billing/subscriptions/:id/transactions
102-
103-
### Invoicing
104-
105-
* POST /v2/invoicing/generate-next-invoice-number
106-
* GET /v2/invoicing/invoices/:id
107-
1089
## Missing endpoints
10910

110-
It is possible that some endpoints are missing in this Client, but you can use built-in `paypal` functions to perform a request: `NewClient -> NewRequest -> SendWithAuth`
11+
It is possible that some endpoints are missing in this client, but you can use built-in `paypal` functions to perform a request: `NewClient -> NewRequest -> SendWithAuth`
11112

11213
## Usage
11314

@@ -373,16 +274,19 @@ c.ListWebhooks(paypal.AncorTypeApplication)
373274
```
374275

375276
### Generate Next Invoice Number
277+
376278
```go
377279
// GenerateInvoiceNumber: generates the next invoice number that is available to the merchant.
378280
c.GenerateInvoiceNumber(ctx) // might return something like "0001" or "0010".
379281
```
380282

381283
### Get Invoice Details by ID
284+
382285
```go
383286
// the second argument is an ID, it should be valid
384287
invoice, err := c.GetInvoiceDetails(ctx, "INV2-XFXV-YW42-ZANU-4F33")
385288
```
289+
386290
* for now, we are yet to implement the ShowAllInvoices endpoint, so use the following cURL request for the same(this gives you the list of invoice-IDs for this customer)
387291
```bash
388292
curl -v -X GET https://api-m.sandbox.paypal.com/v2/invoicing/invoices?total_required=true \
@@ -407,5 +311,6 @@ Current contributors:
407311

408312
## Tests
409313

410-
* Unit tests: `go test -v ./...`
411-
* Integration tests: `go test -tags=integration`
314+
```
315+
go test -v ./...
316+
```

billing.go

-161
This file was deleted.

0 commit comments

Comments
 (0)