paypal-server-sdk 1.0.0 → 1.1.0
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.
- checksums.yaml +4 -4
- data/README.md +42 -36
- data/lib/paypal_server_sdk/controllers/base_controller.rb +1 -1
- data/lib/paypal_server_sdk/controllers/orders_controller.rb +211 -171
- data/lib/paypal_server_sdk/controllers/payments_controller.rb +95 -92
- data/lib/paypal_server_sdk/controllers/vault_controller.rb +81 -81
- data/lib/paypal_server_sdk/exceptions/error_exception.rb +5 -3
- data/lib/paypal_server_sdk/exceptions/o_auth_provider_exception.rb +5 -3
- data/lib/paypal_server_sdk/models/apple_pay_attributes.rb +2 -1
- data/lib/paypal_server_sdk/models/apple_pay_experience_context.rb +68 -0
- data/lib/paypal_server_sdk/models/apple_pay_request.rb +18 -4
- data/lib/paypal_server_sdk/models/callback_configuration.rb +1 -2
- data/lib/paypal_server_sdk/models/card_brand.rb +1 -1
- data/lib/paypal_server_sdk/models/card_customer_information.rb +14 -4
- data/lib/paypal_server_sdk/models/customer_information.rb +16 -5
- data/lib/paypal_server_sdk/models/customer_response.rb +1 -2
- data/lib/paypal_server_sdk/models/google_pay_experience_context.rb +68 -0
- data/lib/paypal_server_sdk/models/google_pay_request.rb +17 -4
- data/lib/paypal_server_sdk/models/item.rb +14 -4
- data/lib/paypal_server_sdk/models/line_item.rb +22 -11
- data/lib/paypal_server_sdk/models/order_billing_plan.rb +93 -0
- data/lib/paypal_server_sdk/models/order_status.rb +5 -5
- data/lib/paypal_server_sdk/models/payment_token_response.rb +1 -2
- data/lib/paypal_server_sdk/models/paypal_wallet_contact_preference.rb +34 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_customer.rb +14 -4
- data/lib/paypal_server_sdk/models/paypal_wallet_customer_request.rb +14 -4
- data/lib/paypal_server_sdk/models/paypal_wallet_experience_context.rb +20 -6
- data/lib/paypal_server_sdk/models/shipping_options_purchase_unit.rb +24 -5
- data/lib/paypal_server_sdk/models/vault_customer.rb +15 -5
- data/lib/paypal_server_sdk/models/vault_response.rb +2 -1
- data/lib/paypal_server_sdk/models/vault_response_customer.rb +1 -1
- data/lib/paypal_server_sdk/models/venmo_wallet_customer_information.rb +24 -4
- data/lib/paypal_server_sdk.rb +149 -145
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6efdfdb5c0d12d4903e4c09dc6a0b033b574e4ace39f00c1d867314ac006783
|
4
|
+
data.tar.gz: d0d73b90afe15c9bb77a687a8a9a0233da6e5365f05fbd39f1b1039bd4af9dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8564b3b7cc18e06c95424b33fe51319e469f70b61ccc96812e7952bddab1e1013aedefc282ce98b16d790e0996d4029263b54ee366a899872373f959097c317
|
7
|
+
data.tar.gz: 3c2d90a8a331ced3469cdd1d49a8d5fe77e657875ee92d56b7b691299bc57fb02528e9f0041b2305e7d49ae6e7fa2bef858885394a95dc2720371b86c91abb59
|
data/README.md
CHANGED
@@ -5,55 +5,52 @@
|
|
5
5
|
|
6
6
|
### Important Notes
|
7
7
|
|
8
|
-
- **Available Features:** This SDK currently contains only 3 of PayPal's API endpoints. Additional endpoints and functionality will be added in the future.
|
9
|
-
- **API Changes:** Expect potential changes in APIs and features as we finalize the product.
|
8
|
+
- **Available Features:** This SDK currently contains only 3 of PayPal's API endpoints. Additional endpoints and functionality will be added in the future.
|
10
9
|
|
11
10
|
### Information
|
12
11
|
|
13
12
|
The PayPal Server SDK provides integration access to the PayPal REST APIs. The API endpoints are divided into distinct controllers:
|
14
13
|
|
15
|
-
- Orders Controller:
|
16
|
-
- Payments Controller:
|
17
|
-
- Vault Controller:
|
18
|
-
|
19
|
-
Find out more here: [https://developer.paypal.com/docs/api/orders/v2/](https://developer.paypal.com/docs/api/orders/v2/)
|
14
|
+
- Orders Controller: [Orders API v2](https://developer.paypal.com/docs/api/orders/v2/)
|
15
|
+
- Payments Controller: [Payments API v2](https://developer.paypal.com/docs/api/payments/v2
|
16
|
+
- Vault Controller: [Payment Method Tokens API v3](https://developer.paypal.com/docs/api/payment-tokens/v3/) *Available in the US only.*
|
20
17
|
|
21
18
|
## Install the Package
|
22
19
|
|
23
20
|
Install the gem from the command line:
|
24
21
|
|
25
22
|
```bash
|
26
|
-
gem install paypal-server-sdk -v 1.
|
23
|
+
gem install paypal-server-sdk -v 1.1.0
|
27
24
|
```
|
28
25
|
|
29
26
|
Or add the gem to your Gemfile and run `bundle`:
|
30
27
|
|
31
28
|
```ruby
|
32
|
-
gem 'paypal-server-sdk', '1.
|
29
|
+
gem 'paypal-server-sdk', '1.1.0'
|
33
30
|
```
|
34
31
|
|
35
|
-
For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/1.
|
32
|
+
For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/1.1.0).
|
36
33
|
|
37
34
|
## Initialize the API Client
|
38
35
|
|
39
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.
|
36
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/client.md)
|
40
37
|
|
41
38
|
The following parameters are configurable for the API Client:
|
42
39
|
|
43
40
|
| Parameter | Type | Description |
|
44
41
|
| --- | --- | --- |
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
42
|
+
| environment | `Environment` | The API environment. <br> **Default: `Environment.SANDBOX`** |
|
43
|
+
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
44
|
+
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
45
|
+
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 60** |
|
46
|
+
| max_retries | `Integer` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
|
47
|
+
| retry_interval | `Float` | Pause in seconds between retries. <br> **Default: 1** |
|
48
|
+
| backoff_factor | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff. <br> **Default: 2** |
|
49
|
+
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
50
|
+
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
51
|
+
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
52
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
53
|
+
| client_credentials_auth_credentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
|
57
54
|
|
58
55
|
The API client can be initialized as follows:
|
59
56
|
|
@@ -91,22 +88,31 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
91
88
|
|
92
89
|
This API uses the following authentication schemes.
|
93
90
|
|
94
|
-
* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.
|
91
|
+
* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/auth/oauth-2-client-credentials-grant.md)
|
95
92
|
|
96
93
|
## List of APIs
|
97
94
|
|
98
|
-
* [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.
|
99
|
-
* [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.
|
100
|
-
* [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.
|
95
|
+
* [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/controllers/orders.md)
|
96
|
+
* [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/controllers/payments.md)
|
97
|
+
* [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/controllers/vault.md)
|
101
98
|
|
102
|
-
##
|
99
|
+
## SDK Infrastructure
|
103
100
|
|
104
|
-
|
105
|
-
|
106
|
-
* [
|
107
|
-
* [
|
108
|
-
* [
|
109
|
-
* [
|
110
|
-
|
111
|
-
|
101
|
+
### Configuration
|
102
|
+
|
103
|
+
* [AbstractLogger](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/abstract-logger.md)
|
104
|
+
* [LoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/logging-configuration.md)
|
105
|
+
* [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/request-logging-configuration.md)
|
106
|
+
* [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/response-logging-configuration.md)
|
107
|
+
|
108
|
+
### HTTP
|
109
|
+
|
110
|
+
* [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/http-response.md)
|
111
|
+
* [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/http-request.md)
|
112
|
+
|
113
|
+
### Utilities
|
114
|
+
|
115
|
+
* [ApiResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/api-response.md)
|
116
|
+
* [ApiHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/api-helper.md)
|
117
|
+
* [DateTimeHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/1.1.0/doc/date-time-helper.md)
|
112
118
|
|
@@ -10,7 +10,7 @@ module PaypalServerSdk
|
|
10
10
|
attr_accessor :config, :http_call_back
|
11
11
|
|
12
12
|
def self.user_agent
|
13
|
-
'PayPal REST API Ruby SDK, Version: 1.
|
13
|
+
'PayPal REST API Ruby SDK, Version: 1.1.0, on OS {os-info}'
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.user_agent_parameters
|