paypal-server-sdk 0.5.2 → 0.6.1
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 +18 -18
- data/lib/paypal_server_sdk/controllers/base_controller.rb +1 -1
- data/lib/paypal_server_sdk/controllers/orders_controller.rb +64 -25
- data/lib/paypal_server_sdk/controllers/payments_controller.rb +53 -26
- data/lib/paypal_server_sdk/controllers/vault_controller.rb +4 -4
- data/lib/paypal_server_sdk/models/avs_code.rb +1 -1
- data/lib/paypal_server_sdk/models/blik_experience_context.rb +2 -2
- data/lib/paypal_server_sdk/models/blik_level0_payment_object.rb +2 -2
- data/lib/paypal_server_sdk/models/blik_one_click_payment_object.rb +2 -2
- data/lib/paypal_server_sdk/models/blik_one_click_payment_request.rb +2 -2
- data/lib/paypal_server_sdk/models/blik_payment_object.rb +4 -4
- data/lib/paypal_server_sdk/models/blik_payment_request.rb +8 -8
- data/lib/paypal_server_sdk/models/card_verification_details.rb +15 -2
- data/lib/paypal_server_sdk/models/card_verification_processor_response.rb +2 -2
- data/lib/paypal_server_sdk/models/confirm_order_request.rb +5 -8
- data/lib/paypal_server_sdk/models/cvv_code.rb +1 -1
- data/lib/paypal_server_sdk/models/eci_flag.rb +1 -1
- data/lib/paypal_server_sdk/models/eps_payment_object.rb +2 -2
- data/lib/paypal_server_sdk/models/eps_payment_request.rb +2 -2
- data/lib/paypal_server_sdk/models/{fullfillment_type.rb → fulfillment_type.rb} +2 -2
- data/lib/paypal_server_sdk/models/google_pay_card.rb +114 -0
- data/lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb +11 -2
- data/lib/paypal_server_sdk/models/ideal_payment_object.rb +2 -2
- data/lib/paypal_server_sdk/models/ideal_payment_request.rb +2 -2
- data/lib/paypal_server_sdk/models/link_description.rb +1 -1
- data/lib/paypal_server_sdk/models/link_http_method.rb +1 -1
- data/lib/paypal_server_sdk/models/{my_bank_payment_object.rb → mybank_payment_object.rb} +2 -2
- data/lib/paypal_server_sdk/models/{my_bank_payment_request.rb → mybank_payment_request.rb} +2 -2
- data/lib/paypal_server_sdk/models/network_token.rb +1 -1
- data/lib/paypal_server_sdk/models/order.rb +12 -12
- data/lib/paypal_server_sdk/models/order_authorize_request_payment_source.rb +2 -2
- data/lib/paypal_server_sdk/models/order_authorize_response.rb +10 -10
- data/lib/paypal_server_sdk/models/order_authorize_response_payment_source.rb +2 -2
- data/lib/paypal_server_sdk/models/order_capture_request_payment_source.rb +2 -2
- data/lib/paypal_server_sdk/models/pa_res_status.rb +1 -1
- data/lib/paypal_server_sdk/models/payment_source.rb +10 -10
- data/lib/paypal_server_sdk/models/payment_source_response.rb +10 -10
- data/lib/paypal_server_sdk/models/payment_token_response_payment_source.rb +2 -2
- data/lib/paypal_server_sdk/models/{pay_pal_experience_landing_page.rb → paypal_experience_landing_page.rb} +2 -2
- data/lib/paypal_server_sdk/models/{pay_pal_experience_user_action.rb → paypal_experience_user_action.rb} +2 -2
- data/lib/paypal_server_sdk/models/{pay_pal_payment_token.rb → paypal_payment_token.rb} +3 -3
- data/lib/paypal_server_sdk/models/{pay_pal_payment_token_customer_type.rb → paypal_payment_token_customer_type.rb} +2 -2
- data/lib/paypal_server_sdk/models/{pay_pal_payment_token_usage_pattern.rb → paypal_payment_token_usage_pattern.rb} +2 -2
- data/lib/paypal_server_sdk/models/{pay_pal_payment_token_usage_type.rb → paypal_payment_token_usage_type.rb} +2 -2
- data/lib/paypal_server_sdk/models/{pay_pal_wallet.rb → paypal_wallet.rb} +6 -6
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_account_verification_status.rb → paypal_wallet_account_verification_status.rb} +2 -2
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_attributes.rb → paypal_wallet_attributes.rb} +6 -6
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_attributes_response.rb → paypal_wallet_attributes_response.rb} +4 -4
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_customer.rb → paypal_wallet_customer.rb} +2 -2
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_customer_request.rb → paypal_wallet_customer_request.rb} +3 -3
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_experience_context.rb → paypal_wallet_experience_context.rb} +8 -8
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_response.rb → paypal_wallet_response.rb} +5 -5
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_vault_instruction.rb → paypal_wallet_vault_instruction.rb} +8 -8
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_vault_response.rb → paypal_wallet_vault_response.rb} +5 -5
- data/lib/paypal_server_sdk/models/{pay_pal_wallet_vault_status.rb → paypal_wallet_vault_status.rb} +2 -2
- data/lib/paypal_server_sdk/models/portable_postal_address_medium_grained.rb +116 -0
- data/lib/paypal_server_sdk/models/processor_response.rb +2 -2
- data/lib/paypal_server_sdk/models/setup_token_request_payment_source.rb +2 -2
- data/lib/paypal_server_sdk/models/setup_token_response_payment_source.rb +2 -2
- data/lib/paypal_server_sdk/models/shipment_carrier.rb +325 -1
- data/lib/paypal_server_sdk/models/shipping_details.rb +1 -1
- data/lib/paypal_server_sdk/models/shipping_with_tracking_details.rb +1 -1
- data/lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb +1 -1
- data/lib/paypal_server_sdk/models/universal_product_code.rb +1 -1
- data/lib/paypal_server_sdk/models/upc_type.rb +1 -1
- data/lib/paypal_server_sdk/models/{vault_pay_pal_wallet_request.rb → vault_paypal_wallet_request.rb} +2 -2
- data/lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb +1 -1
- data/lib/paypal_server_sdk.rb +24 -22
- metadata +25 -24
- data/lib/paypal_server_sdk/models/processing_instruction.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f1caaad4e69a1c19100e13e2b37cdba8012c3fa15270cd030b3282259a45f6c
|
4
|
+
data.tar.gz: f2caa98f19472826f5d180d57c51e6c739b3ca3a004641994ea568373ec13a64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5c979d2bb459881dfd4130303006ddb0a53219defcf9da0f65450b0c4b9db54e97f0a318077ba3f1d6983c38744cfcff59db9b822df45183387f3b2b0b7c38d
|
7
|
+
data.tar.gz: 817fa05d3196ef08f6fdd52134730f0f88e39a1d431cb89a91dbc71aa1f243bc73a36f933808d7d0b30947fc403a76c612cd27467598805e471612b159e586c2
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
# Getting Started with
|
2
|
+
# Getting Started with PayPal Server SDK
|
3
3
|
|
4
4
|
## Introduction
|
5
5
|
|
@@ -27,20 +27,20 @@ Find out more here: [https://developer.paypal.com/docs/api/orders/v2/](https://d
|
|
27
27
|
Install the gem from the command line:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem install paypal-server-sdk -v 0.
|
30
|
+
gem install paypal-server-sdk -v 0.6.1
|
31
31
|
```
|
32
32
|
|
33
33
|
Or add the gem to your Gemfile and run `bundle`:
|
34
34
|
|
35
35
|
```ruby
|
36
|
-
gem 'paypal-server-sdk', '0.
|
36
|
+
gem 'paypal-server-sdk', '0.6.1'
|
37
37
|
```
|
38
38
|
|
39
|
-
For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/0.
|
39
|
+
For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/0.6.1).
|
40
40
|
|
41
41
|
## Initialize the API Client
|
42
42
|
|
43
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
43
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/client.md)
|
44
44
|
|
45
45
|
The following parameters are configurable for the API Client:
|
46
46
|
|
@@ -56,8 +56,8 @@ The following parameters are configurable for the API Client:
|
|
56
56
|
| `retry_statuses` | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
57
57
|
| `retry_methods` | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
58
58
|
| `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
59
|
-
| `logging_configuration` | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
60
|
-
| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
59
|
+
| `logging_configuration` | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
60
|
+
| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
|
61
61
|
|
62
62
|
The API client can be initialized as follows:
|
63
63
|
|
@@ -107,21 +107,21 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
107
107
|
|
108
108
|
This API uses the following authentication schemes.
|
109
109
|
|
110
|
-
* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
110
|
+
* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/auth/oauth-2-client-credentials-grant.md)
|
111
111
|
|
112
112
|
## List of APIs
|
113
113
|
|
114
|
-
* [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
115
|
-
* [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
116
|
-
* [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
114
|
+
* [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/controllers/orders.md)
|
115
|
+
* [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/controllers/payments.md)
|
116
|
+
* [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/controllers/vault.md)
|
117
117
|
|
118
118
|
## Classes Documentation
|
119
119
|
|
120
|
-
* [Utility Classes](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
121
|
-
* [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
122
|
-
* [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
123
|
-
* [LoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
124
|
-
* [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
125
|
-
* [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
126
|
-
* [Abstract Logger](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
120
|
+
* [Utility Classes](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/utility-classes.md)
|
121
|
+
* [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/http-response.md)
|
122
|
+
* [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/http-request.md)
|
123
|
+
* [LoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/logging-configuration.md)
|
124
|
+
* [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/request-logging-configuration.md)
|
125
|
+
* [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/response-logging-configuration.md)
|
126
|
+
* [Abstract Logger](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.6.1/doc/abstract-logger.md)
|
127
127
|
|
@@ -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: 0.
|
13
|
+
'PayPal REST API Ruby SDK, Version: 0.6.1, on OS {os-info}'
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.user_agent_parameters
|
@@ -17,12 +17,15 @@ module PaypalServerSdk
|
|
17
17
|
# href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#cr
|
18
18
|
# eate-order">Orders v2 errors</a>.</blockquote>
|
19
19
|
# @param [OrderRequest] body Required parameter: Example:
|
20
|
-
# @param [String]
|
20
|
+
# @param [String] paypal_request_id Optional parameter: The server stores
|
21
21
|
# keys for 6 hours. The API callers can request the times to up to 72 hours
|
22
|
-
# by speaking to their Account Manager.
|
23
|
-
#
|
22
|
+
# by speaking to their Account Manager. It is mandatory for all single-step
|
23
|
+
# create order calls (E.g. Create Order Request with payment source
|
24
|
+
# information like Card, PayPal.vault_id, PayPal.billing_agreement_id,
|
25
|
+
# etc).
|
26
|
+
# @param [String] paypal_partner_attribution_id Optional parameter:
|
24
27
|
# Example:
|
25
|
-
# @param [String]
|
28
|
+
# @param [String] paypal_client_metadata_id Optional parameter: Example:
|
26
29
|
# @param [String] prefer Optional parameter: The preferred server response
|
27
30
|
# upon successful completion of the request. Value
|
28
31
|
# is:<ul><li><code>return=minimal</code>. The server returns a minimal
|
@@ -31,6 +34,11 @@ module PaypalServerSdk
|
|
31
34
|
# HATEOAS links.</li><li><code>return=representation</code>. The server
|
32
35
|
# returns a complete resource representation, including the current state of
|
33
36
|
# the resource.</li></ul>
|
37
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
38
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
39
|
+
# merchant. For details, see <a
|
40
|
+
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
41
|
+
# n">PayPal-Auth-Assertion</a>.
|
34
42
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
35
43
|
def orders_create(options = {})
|
36
44
|
new_api_call_builder
|
@@ -39,10 +47,11 @@ module PaypalServerSdk
|
|
39
47
|
Server::DEFAULT)
|
40
48
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
41
49
|
.body_param(new_parameter(options['body']))
|
42
|
-
.header_param(new_parameter(options['
|
43
|
-
.header_param(new_parameter(options['
|
44
|
-
.header_param(new_parameter(options['
|
50
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
51
|
+
.header_param(new_parameter(options['paypal_partner_attribution_id'], key: 'PayPal-Partner-Attribution-Id'))
|
52
|
+
.header_param(new_parameter(options['paypal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id'))
|
45
53
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
54
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
46
55
|
.header_param(new_parameter('application/json', key: 'accept'))
|
47
56
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
48
57
|
.auth(Single.new('Oauth2')))
|
@@ -74,6 +83,11 @@ module PaypalServerSdk
|
|
74
83
|
# t-order">Orders v2 errors</a>.</blockquote>
|
75
84
|
# @param [String] id Required parameter: The ID of the order for which to
|
76
85
|
# show details.
|
86
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
87
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
88
|
+
# merchant. For details, see <a
|
89
|
+
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
90
|
+
# n">PayPal-Auth-Assertion</a>.
|
77
91
|
# @param [String] fields Optional parameter: A comma-separated list of
|
78
92
|
# fields that should be returned for the order. Valid filter field is
|
79
93
|
# `payment_source`.
|
@@ -85,6 +99,7 @@ module PaypalServerSdk
|
|
85
99
|
Server::DEFAULT)
|
86
100
|
.template_param(new_parameter(options['id'], key: 'id')
|
87
101
|
.should_encode(true))
|
102
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
88
103
|
.query_param(new_parameter(options['fields'], key: 'fields'))
|
89
104
|
.header_param(new_parameter('application/json', key: 'accept'))
|
90
105
|
.auth(Single.new('Oauth2')))
|
@@ -166,6 +181,11 @@ module PaypalServerSdk
|
|
166
181
|
# remove</td><td></td></tr><tr><td><code>application_context.client_configur
|
167
182
|
# ation</code></td><td>replace, add</td><td></td></tr></tbody></table>
|
168
183
|
# @param [String] id Required parameter: The ID of the order to update.
|
184
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
185
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
186
|
+
# merchant. For details, see <a
|
187
|
+
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
188
|
+
# n">PayPal-Auth-Assertion</a>.
|
169
189
|
# @param [Array[Patch]] body Optional parameter: Example:
|
170
190
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
171
191
|
def orders_patch(options = {})
|
@@ -176,6 +196,7 @@ module PaypalServerSdk
|
|
176
196
|
.template_param(new_parameter(options['id'], key: 'id')
|
177
197
|
.should_encode(true))
|
178
198
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
199
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
179
200
|
.body_param(new_parameter(options['body']))
|
180
201
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
181
202
|
.auth(Single.new('Oauth2')))
|
@@ -207,7 +228,12 @@ module PaypalServerSdk
|
|
207
228
|
# payment source.
|
208
229
|
# @param [String] id Required parameter: The ID of the order for which the
|
209
230
|
# payer confirms their intent to pay.
|
210
|
-
# @param [String]
|
231
|
+
# @param [String] paypal_client_metadata_id Optional parameter: Example:
|
232
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
233
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
234
|
+
# merchant. For details, see <a
|
235
|
+
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
236
|
+
# n">PayPal-Auth-Assertion</a>.
|
211
237
|
# @param [String] prefer Optional parameter: The preferred server response
|
212
238
|
# upon successful completion of the request. Value
|
213
239
|
# is:<ul><li><code>return=minimal</code>. The server returns a minimal
|
@@ -226,7 +252,8 @@ module PaypalServerSdk
|
|
226
252
|
.template_param(new_parameter(options['id'], key: 'id')
|
227
253
|
.should_encode(true))
|
228
254
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
229
|
-
.header_param(new_parameter(options['
|
255
|
+
.header_param(new_parameter(options['paypal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id'))
|
256
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
230
257
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
231
258
|
.body_param(new_parameter(options['body']))
|
232
259
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -266,9 +293,12 @@ module PaypalServerSdk
|
|
266
293
|
# thorize-order">Orders v2 errors</a>.</blockquote>
|
267
294
|
# @param [String] id Required parameter: The ID of the order for which to
|
268
295
|
# authorize.
|
269
|
-
# @param [String]
|
296
|
+
# @param [String] paypal_request_id Optional parameter: The server stores
|
270
297
|
# keys for 6 hours. The API callers can request the times to up to 72 hours
|
271
|
-
# by speaking to their Account Manager.
|
298
|
+
# by speaking to their Account Manager. It is mandatory for all single-step
|
299
|
+
# create order calls (E.g. Create Order Request with payment source
|
300
|
+
# information like Card, PayPal.vault_id, PayPal.billing_agreement_id,
|
301
|
+
# etc).
|
272
302
|
# @param [String] prefer Optional parameter: The preferred server response
|
273
303
|
# upon successful completion of the request. Value
|
274
304
|
# is:<ul><li><code>return=minimal</code>. The server returns a minimal
|
@@ -277,8 +307,8 @@ module PaypalServerSdk
|
|
277
307
|
# HATEOAS links.</li><li><code>return=representation</code>. The server
|
278
308
|
# returns a complete resource representation, including the current state of
|
279
309
|
# the resource.</li></ul>
|
280
|
-
# @param [String]
|
281
|
-
# @param [String]
|
310
|
+
# @param [String] paypal_client_metadata_id Optional parameter: Example:
|
311
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
282
312
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
283
313
|
# merchant. For details, see <a
|
284
314
|
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
@@ -293,10 +323,10 @@ module PaypalServerSdk
|
|
293
323
|
.template_param(new_parameter(options['id'], key: 'id')
|
294
324
|
.should_encode(true))
|
295
325
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
296
|
-
.header_param(new_parameter(options['
|
326
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
297
327
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
298
|
-
.header_param(new_parameter(options['
|
299
|
-
.header_param(new_parameter(options['
|
328
|
+
.header_param(new_parameter(options['paypal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id'))
|
329
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
300
330
|
.body_param(new_parameter(options['body']))
|
301
331
|
.header_param(new_parameter('application/json', key: 'accept'))
|
302
332
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
@@ -343,9 +373,12 @@ module PaypalServerSdk
|
|
343
373
|
# pture-order">Orders v2 errors</a>.</blockquote>
|
344
374
|
# @param [String] id Required parameter: The ID of the order for which to
|
345
375
|
# capture a payment.
|
346
|
-
# @param [String]
|
376
|
+
# @param [String] paypal_request_id Optional parameter: The server stores
|
347
377
|
# keys for 6 hours. The API callers can request the times to up to 72 hours
|
348
|
-
# by speaking to their Account Manager.
|
378
|
+
# by speaking to their Account Manager. It is mandatory for all single-step
|
379
|
+
# create order calls (E.g. Create Order Request with payment source
|
380
|
+
# information like Card, PayPal.vault_id, PayPal.billing_agreement_id,
|
381
|
+
# etc).
|
349
382
|
# @param [String] prefer Optional parameter: The preferred server response
|
350
383
|
# upon successful completion of the request. Value
|
351
384
|
# is:<ul><li><code>return=minimal</code>. The server returns a minimal
|
@@ -354,8 +387,8 @@ module PaypalServerSdk
|
|
354
387
|
# HATEOAS links.</li><li><code>return=representation</code>. The server
|
355
388
|
# returns a complete resource representation, including the current state of
|
356
389
|
# the resource.</li></ul>
|
357
|
-
# @param [String]
|
358
|
-
# @param [String]
|
390
|
+
# @param [String] paypal_client_metadata_id Optional parameter: Example:
|
391
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
359
392
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
360
393
|
# merchant. For details, see <a
|
361
394
|
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
@@ -370,10 +403,10 @@ module PaypalServerSdk
|
|
370
403
|
.template_param(new_parameter(options['id'], key: 'id')
|
371
404
|
.should_encode(true))
|
372
405
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
373
|
-
.header_param(new_parameter(options['
|
406
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
374
407
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
375
|
-
.header_param(new_parameter(options['
|
376
|
-
.header_param(new_parameter(options['
|
408
|
+
.header_param(new_parameter(options['paypal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id'))
|
409
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
377
410
|
.body_param(new_parameter(options['body']))
|
378
411
|
.header_param(new_parameter('application/json', key: 'accept'))
|
379
412
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
@@ -414,7 +447,7 @@ module PaypalServerSdk
|
|
414
447
|
# @param [String] id Required parameter: The ID of the order that the
|
415
448
|
# tracking information is associated with.
|
416
449
|
# @param [OrderTrackerRequest] body Required parameter: Example:
|
417
|
-
# @param [String]
|
450
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
418
451
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
419
452
|
# merchant. For details, see <a
|
420
453
|
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
@@ -429,7 +462,7 @@ module PaypalServerSdk
|
|
429
462
|
.should_encode(true))
|
430
463
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
431
464
|
.body_param(new_parameter(options['body']))
|
432
|
-
.header_param(new_parameter(options['
|
465
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
433
466
|
.header_param(new_parameter('application/json', key: 'accept'))
|
434
467
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
435
468
|
.auth(Single.new('Oauth2')))
|
@@ -473,6 +506,11 @@ module PaypalServerSdk
|
|
473
506
|
# @param [String] id Required parameter: The ID of the order that the
|
474
507
|
# tracking information is associated with.
|
475
508
|
# @param [String] tracker_id Required parameter: The order tracking ID.
|
509
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
510
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
511
|
+
# merchant. For details, see <a
|
512
|
+
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
513
|
+
# n">PayPal-Auth-Assertion</a>.
|
476
514
|
# @param [Array[Patch]] body Optional parameter: Example:
|
477
515
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
478
516
|
def orders_trackers_patch(options = {})
|
@@ -485,6 +523,7 @@ module PaypalServerSdk
|
|
485
523
|
.template_param(new_parameter(options['tracker_id'], key: 'tracker_id')
|
486
524
|
.should_encode(true))
|
487
525
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
526
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
488
527
|
.body_param(new_parameter(options['body']))
|
489
528
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
490
529
|
.auth(Single.new('Oauth2')))
|
@@ -9,14 +9,23 @@ module PaypalServerSdk
|
|
9
9
|
# Shows details for an authorized payment, by ID.
|
10
10
|
# @param [String] authorization_id Required parameter: The ID of the
|
11
11
|
# authorized payment for which to show details.
|
12
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
13
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
14
|
+
# merchant. For details, see
|
15
|
+
# [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse
|
16
|
+
# rtion).<blockquote><strong>Note:</strong>For three party transactions in
|
17
|
+
# which a partner is managing the API calls on behalf of a merchant, the
|
18
|
+
# partner must identify the merchant using either a PayPal-Auth-Assertion
|
19
|
+
# header or an access token with target_subject.</blockquote>
|
12
20
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
13
|
-
def authorizations_get(
|
21
|
+
def authorizations_get(options = {})
|
14
22
|
new_api_call_builder
|
15
23
|
.request(new_request_builder(HttpMethodEnum::GET,
|
16
24
|
'/v2/payments/authorizations/{authorization_id}',
|
17
25
|
Server::DEFAULT)
|
18
|
-
.template_param(new_parameter(authorization_id, key: 'authorization_id')
|
26
|
+
.template_param(new_parameter(options['authorization_id'], key: 'authorization_id')
|
19
27
|
.should_encode(true))
|
28
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
20
29
|
.header_param(new_parameter('application/json', key: 'accept'))
|
21
30
|
.auth(Single.new('Oauth2')))
|
22
31
|
.response(new_response_handler
|
@@ -27,10 +36,6 @@ module PaypalServerSdk
|
|
27
36
|
'Authentication failed due to missing authorization header, or'\
|
28
37
|
' invalid authentication credentials.',
|
29
38
|
ErrorException)
|
30
|
-
.local_error('403',
|
31
|
-
'The request failed because the caller has insufficient'\
|
32
|
-
' permissions.',
|
33
|
-
ErrorException)
|
34
39
|
.local_error('404',
|
35
40
|
'The request failed because the resource does not exist.',
|
36
41
|
ErrorException)
|
@@ -46,7 +51,7 @@ module PaypalServerSdk
|
|
46
51
|
# Captures an authorized payment, by ID.
|
47
52
|
# @param [String] authorization_id Required parameter: The PayPal-generated
|
48
53
|
# ID for the authorized payment to capture.
|
49
|
-
# @param [String]
|
54
|
+
# @param [String] paypal_request_id Optional parameter: The server stores
|
50
55
|
# keys for 45 days.
|
51
56
|
# @param [String] prefer Optional parameter: The preferred server response
|
52
57
|
# upon successful completion of the request. Value
|
@@ -56,6 +61,14 @@ module PaypalServerSdk
|
|
56
61
|
# HATEOAS links.</li><li><code>return=representation</code>. The server
|
57
62
|
# returns a complete resource representation, including the current state of
|
58
63
|
# the resource.</li></ul>
|
64
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
65
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
66
|
+
# merchant. For details, see
|
67
|
+
# [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse
|
68
|
+
# rtion).<blockquote><strong>Note:</strong>For three party transactions in
|
69
|
+
# which a partner is managing the API calls on behalf of a merchant, the
|
70
|
+
# partner must identify the merchant using either a PayPal-Auth-Assertion
|
71
|
+
# header or an access token with target_subject.</blockquote>
|
59
72
|
# @param [CaptureRequest] body Optional parameter: Example:
|
60
73
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
61
74
|
def authorizations_capture(options = {})
|
@@ -66,8 +79,9 @@ module PaypalServerSdk
|
|
66
79
|
.template_param(new_parameter(options['authorization_id'], key: 'authorization_id')
|
67
80
|
.should_encode(true))
|
68
81
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
69
|
-
.header_param(new_parameter(options['
|
82
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
70
83
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
84
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
71
85
|
.body_param(new_parameter(options['body']))
|
72
86
|
.header_param(new_parameter('application/json', key: 'accept'))
|
73
87
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
@@ -124,7 +138,7 @@ module PaypalServerSdk
|
|
124
138
|
# supported for Partner use cases.</blockquote>
|
125
139
|
# @param [String] authorization_id Required parameter: The PayPal-generated
|
126
140
|
# ID for the authorized payment to reauthorize.
|
127
|
-
# @param [String]
|
141
|
+
# @param [String] paypal_request_id Optional parameter: The server stores
|
128
142
|
# keys for 45 days.
|
129
143
|
# @param [String] prefer Optional parameter: The preferred server response
|
130
144
|
# upon successful completion of the request. Value
|
@@ -134,6 +148,14 @@ module PaypalServerSdk
|
|
134
148
|
# HATEOAS links.</li><li><code>return=representation</code>. The server
|
135
149
|
# returns a complete resource representation, including the current state of
|
136
150
|
# the resource.</li></ul>
|
151
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
152
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
153
|
+
# merchant. For details, see
|
154
|
+
# [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse
|
155
|
+
# rtion).<blockquote><strong>Note:</strong>For three party transactions in
|
156
|
+
# which a partner is managing the API calls on behalf of a merchant, the
|
157
|
+
# partner must identify the merchant using either a PayPal-Auth-Assertion
|
158
|
+
# header or an access token with target_subject.</blockquote>
|
137
159
|
# @param [ReauthorizeRequest] body Optional parameter: Example:
|
138
160
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
139
161
|
def authorizations_reauthorize(options = {})
|
@@ -144,8 +166,9 @@ module PaypalServerSdk
|
|
144
166
|
.template_param(new_parameter(options['authorization_id'], key: 'authorization_id')
|
145
167
|
.should_encode(true))
|
146
168
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
147
|
-
.header_param(new_parameter(options['
|
169
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
148
170
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
171
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
149
172
|
.body_param(new_parameter(options['body']))
|
150
173
|
.header_param(new_parameter('application/json', key: 'accept'))
|
151
174
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
@@ -162,10 +185,6 @@ module PaypalServerSdk
|
|
162
185
|
'Authentication failed due to missing authorization header, or'\
|
163
186
|
' invalid authentication credentials.',
|
164
187
|
ErrorException)
|
165
|
-
.local_error('403',
|
166
|
-
'The request failed because the caller has insufficient'\
|
167
|
-
' permissions.',
|
168
|
-
ErrorException)
|
169
188
|
.local_error('404',
|
170
189
|
'The request failed because the resource does not exist.',
|
171
190
|
ErrorException)
|
@@ -186,7 +205,7 @@ module PaypalServerSdk
|
|
186
205
|
# authorized payment that has been fully captured.
|
187
206
|
# @param [String] authorization_id Required parameter: The PayPal-generated
|
188
207
|
# ID for the authorized payment to void.
|
189
|
-
# @param [String]
|
208
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
190
209
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
191
210
|
# merchant. For details, see
|
192
211
|
# [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse
|
@@ -194,6 +213,8 @@ module PaypalServerSdk
|
|
194
213
|
# which a partner is managing the API calls on behalf of a merchant, the
|
195
214
|
# partner must identify the merchant using either a PayPal-Auth-Assertion
|
196
215
|
# header or an access token with target_subject.</blockquote>
|
216
|
+
# @param [String] paypal_request_id Optional parameter: The server stores
|
217
|
+
# keys for 45 days.
|
197
218
|
# @param [String] prefer Optional parameter: The preferred server response
|
198
219
|
# upon successful completion of the request. Value
|
199
220
|
# is:<ul><li><code>return=minimal</code>. The server returns a minimal
|
@@ -210,7 +231,8 @@ module PaypalServerSdk
|
|
210
231
|
Server::DEFAULT)
|
211
232
|
.template_param(new_parameter(options['authorization_id'], key: 'authorization_id')
|
212
233
|
.should_encode(true))
|
213
|
-
.header_param(new_parameter(options['
|
234
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
235
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
214
236
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
215
237
|
.header_param(new_parameter('application/json', key: 'accept'))
|
216
238
|
.auth(Single.new('Oauth2')))
|
@@ -219,10 +241,6 @@ module PaypalServerSdk
|
|
219
241
|
.deserializer(APIHelper.method(:custom_type_deserializer))
|
220
242
|
.deserialize_into(PaymentAuthorization.method(:from_hash))
|
221
243
|
.is_api_response(true)
|
222
|
-
.local_error('400',
|
223
|
-
'The request failed because it is not well-formed or is'\
|
224
|
-
' syntactically incorrect or violates schema.',
|
225
|
-
ErrorException)
|
226
244
|
.local_error('401',
|
227
245
|
'Authentication failed due to missing authorization header, or'\
|
228
246
|
' invalid authentication credentials.',
|
@@ -293,7 +311,7 @@ module PaypalServerSdk
|
|
293
311
|
# <code>amount</code> object in the JSON request body.
|
294
312
|
# @param [String] capture_id Required parameter: The PayPal-generated ID for
|
295
313
|
# the captured payment to refund.
|
296
|
-
# @param [String]
|
314
|
+
# @param [String] paypal_request_id Optional parameter: The server stores
|
297
315
|
# keys for 45 days.
|
298
316
|
# @param [String] prefer Optional parameter: The preferred server response
|
299
317
|
# upon successful completion of the request. Value
|
@@ -303,7 +321,7 @@ module PaypalServerSdk
|
|
303
321
|
# HATEOAS links.</li><li><code>return=representation</code>. The server
|
304
322
|
# returns a complete resource representation, including the current state of
|
305
323
|
# the resource.</li></ul>
|
306
|
-
# @param [String]
|
324
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
307
325
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
308
326
|
# merchant. For details, see
|
309
327
|
# [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse
|
@@ -321,9 +339,9 @@ module PaypalServerSdk
|
|
321
339
|
.template_param(new_parameter(options['capture_id'], key: 'capture_id')
|
322
340
|
.should_encode(true))
|
323
341
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
324
|
-
.header_param(new_parameter(options['
|
342
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
325
343
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
326
|
-
.header_param(new_parameter(options['
|
344
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
327
345
|
.body_param(new_parameter(options['body']))
|
328
346
|
.header_param(new_parameter('application/json', key: 'accept'))
|
329
347
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
@@ -367,14 +385,23 @@ module PaypalServerSdk
|
|
367
385
|
# Shows details for a refund, by ID.
|
368
386
|
# @param [String] refund_id Required parameter: The PayPal-generated ID for
|
369
387
|
# the refund for which to show details.
|
388
|
+
# @param [String] paypal_auth_assertion Optional parameter: An
|
389
|
+
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
390
|
+
# merchant. For details, see
|
391
|
+
# [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse
|
392
|
+
# rtion).<blockquote><strong>Note:</strong>For three party transactions in
|
393
|
+
# which a partner is managing the API calls on behalf of a merchant, the
|
394
|
+
# partner must identify the merchant using either a PayPal-Auth-Assertion
|
395
|
+
# header or an access token with target_subject.</blockquote>
|
370
396
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
371
|
-
def refunds_get(
|
397
|
+
def refunds_get(options = {})
|
372
398
|
new_api_call_builder
|
373
399
|
.request(new_request_builder(HttpMethodEnum::GET,
|
374
400
|
'/v2/payments/refunds/{refund_id}',
|
375
401
|
Server::DEFAULT)
|
376
|
-
.template_param(new_parameter(refund_id, key: 'refund_id')
|
402
|
+
.template_param(new_parameter(options['refund_id'], key: 'refund_id')
|
377
403
|
.should_encode(true))
|
404
|
+
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
378
405
|
.header_param(new_parameter('application/json', key: 'accept'))
|
379
406
|
.auth(Single.new('Oauth2')))
|
380
407
|
.response(new_response_handler
|
@@ -8,7 +8,7 @@ module PaypalServerSdk
|
|
8
8
|
class VaultController < BaseController
|
9
9
|
# Creates a Payment Token from the given payment source and adds it to the
|
10
10
|
# Vault of the associated customer.
|
11
|
-
# @param [String]
|
11
|
+
# @param [String] paypal_request_id Required parameter: The server stores
|
12
12
|
# keys for 3 hours.
|
13
13
|
# @param [PaymentTokenRequest] body Required parameter: Payment Token
|
14
14
|
# creation with a financial instrument and an optional customer_id.
|
@@ -18,7 +18,7 @@ module PaypalServerSdk
|
|
18
18
|
.request(new_request_builder(HttpMethodEnum::POST,
|
19
19
|
'/v3/vault/payment-tokens',
|
20
20
|
Server::DEFAULT)
|
21
|
-
.header_param(new_parameter(options['
|
21
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
22
22
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
23
23
|
.body_param(new_parameter(options['body']))
|
24
24
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -150,7 +150,7 @@ module PaypalServerSdk
|
|
150
150
|
|
151
151
|
# Creates a Setup Token from the given payment source and adds it to the
|
152
152
|
# Vault of the associated customer.
|
153
|
-
# @param [String]
|
153
|
+
# @param [String] paypal_request_id Required parameter: The server stores
|
154
154
|
# keys for 3 hours.
|
155
155
|
# @param [SetupTokenRequest] body Required parameter: Setup Token creation
|
156
156
|
# with a instrument type optional financial instrument details and
|
@@ -161,7 +161,7 @@ module PaypalServerSdk
|
|
161
161
|
.request(new_request_builder(HttpMethodEnum::POST,
|
162
162
|
'/v3/vault/setup-tokens',
|
163
163
|
Server::DEFAULT)
|
164
|
-
.header_param(new_parameter(options['
|
164
|
+
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
165
165
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
166
166
|
.body_param(new_parameter(options['body']))
|
167
167
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -6,7 +6,7 @@
|
|
6
6
|
module PaypalServerSdk
|
7
7
|
# Customizes the payer experience during the approval process for the BLIK
|
8
8
|
# payment.
|
9
|
-
class
|
9
|
+
class BlikExperienceContext < BaseModel
|
10
10
|
SKIP = Object.new
|
11
11
|
private_constant :SKIP
|
12
12
|
|
@@ -110,7 +110,7 @@ module PaypalServerSdk
|
|
110
110
|
hash.key?('consumer_user_agent') ? hash['consumer_user_agent'] : SKIP
|
111
111
|
|
112
112
|
# Create object from extracted values.
|
113
|
-
|
113
|
+
BlikExperienceContext.new(brand_name: brand_name,
|
114
114
|
locale: locale,
|
115
115
|
shipping_preference: shipping_preference,
|
116
116
|
return_url: return_url,
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
7
|
# Information used to pay using BLIK level_0 flow.
|
8
|
-
class
|
8
|
+
class BlikLevel0PaymentObject < BaseModel
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
@@ -42,7 +42,7 @@ module PaypalServerSdk
|
|
42
42
|
auth_code = hash.key?('auth_code') ? hash['auth_code'] : nil
|
43
43
|
|
44
44
|
# Create object from extracted values.
|
45
|
-
|
45
|
+
BlikLevel0PaymentObject.new(auth_code: auth_code)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|