paypal-server-sdk 2.2.0 → 2.3.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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -28
  3. data/lib/paypal_server_sdk/controllers/base_controller.rb +1 -1
  4. data/lib/paypal_server_sdk/controllers/transaction_search_controller.rb +4 -4
  5. data/lib/paypal_server_sdk/exceptions/error_exception.rb +1 -1
  6. data/lib/paypal_server_sdk/exceptions/subscription_error_exception.rb +1 -1
  7. data/lib/paypal_server_sdk/models/address.rb +2 -1
  8. data/lib/paypal_server_sdk/models/amount_with_breakdown.rb +3 -2
  9. data/lib/paypal_server_sdk/models/apple_pay_card_response.rb +6 -5
  10. data/lib/paypal_server_sdk/models/bancontact_payment_object.rb +6 -5
  11. data/lib/paypal_server_sdk/models/bancontact_payment_request.rb +6 -5
  12. data/lib/paypal_server_sdk/models/bin_details.rb +6 -5
  13. data/lib/paypal_server_sdk/models/blik_experience_context.rb +3 -2
  14. data/lib/paypal_server_sdk/models/blik_payment_object.rb +6 -5
  15. data/lib/paypal_server_sdk/models/blik_payment_request.rb +6 -5
  16. data/lib/paypal_server_sdk/models/card_response_address.rb +2 -1
  17. data/lib/paypal_server_sdk/models/card_response_with_billing_address.rb +2 -1
  18. data/lib/paypal_server_sdk/models/confirm_order_request.rb +16 -5
  19. data/lib/paypal_server_sdk/models/customer_vault_payment_tokens_response.rb +2 -1
  20. data/lib/paypal_server_sdk/models/eps_payment_object.rb +6 -5
  21. data/lib/paypal_server_sdk/models/eps_payment_request.rb +6 -5
  22. data/lib/paypal_server_sdk/models/error_details.rb +3 -3
  23. data/lib/paypal_server_sdk/models/exchange_rate.rb +4 -2
  24. data/lib/paypal_server_sdk/models/experience_context.rb +3 -2
  25. data/lib/paypal_server_sdk/models/giropay_payment_object.rb +6 -5
  26. data/lib/paypal_server_sdk/models/giropay_payment_request.rb +6 -5
  27. data/lib/paypal_server_sdk/models/ideal_payment_object.rb +6 -5
  28. data/lib/paypal_server_sdk/models/ideal_payment_request.rb +6 -5
  29. data/lib/paypal_server_sdk/models/link_description.rb +6 -1
  30. data/lib/paypal_server_sdk/models/money.rb +3 -2
  31. data/lib/paypal_server_sdk/models/mybank_payment_object.rb +6 -5
  32. data/lib/paypal_server_sdk/models/mybank_payment_request.rb +6 -5
  33. data/lib/paypal_server_sdk/models/order.rb +18 -5
  34. data/lib/paypal_server_sdk/models/order_authorize_response.rb +18 -5
  35. data/lib/paypal_server_sdk/models/order_confirm_application_context.rb +3 -2
  36. data/lib/paypal_server_sdk/models/order_request.rb +17 -5
  37. data/lib/paypal_server_sdk/models/p24_payment_object.rb +6 -5
  38. data/lib/paypal_server_sdk/models/p24_payment_request.rb +6 -5
  39. data/lib/paypal_server_sdk/models/payment_token_response.rb +2 -1
  40. data/lib/paypal_server_sdk/models/paypal_wallet_experience_context.rb +3 -2
  41. data/lib/paypal_server_sdk/models/processing_instruction.rb +33 -0
  42. data/lib/paypal_server_sdk/models/search_response.rb +1 -1
  43. data/lib/paypal_server_sdk/models/sepa_debit_experience_context.rb +3 -2
  44. data/lib/paypal_server_sdk/models/setup_token_response.rb +2 -1
  45. data/lib/paypal_server_sdk/models/sofort_payment_object.rb +6 -5
  46. data/lib/paypal_server_sdk/models/sofort_payment_request.rb +6 -5
  47. data/lib/paypal_server_sdk/models/trustly_payment_object.rb +6 -5
  48. data/lib/paypal_server_sdk/models/trustly_payment_request.rb +6 -5
  49. data/lib/paypal_server_sdk/models/vault_card_experience_context.rb +3 -2
  50. data/lib/paypal_server_sdk/models/vault_experience_context.rb +3 -2
  51. data/lib/paypal_server_sdk.rb +1 -0
  52. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 897375c15dd72b5ca2daacf2cab5d59d6ce03c115988a287046464457fe0ff1c
4
- data.tar.gz: f550128d4e3650b8b88e3c93e87b3cb531847d71cbec66419671c753f5b5e6c9
3
+ metadata.gz: 9506e677732c2b7a53e76023a34408eb9bf232cfbb1323d4307d2e6be384dc9e
4
+ data.tar.gz: c66ee3b8960237979f34214df9e722cbea47420863ecc25529a513c72dad9577
5
5
  SHA512:
6
- metadata.gz: 7873e8c5e2f95ca2c3ad61b53bf1a59117f1d543040f0edf84d24808a4fd7b78e94c1968eccf93ad4cf44f62b6220c958069a616db1e6dc4d9aeced4143df03f
7
- data.tar.gz: c183c3346a29a306bbcd7a473ed60d642a47512bf8b37e7e86e3450e4cd6d9a138899b586354c3936330cd78e57d7f91be24d259249886dac8b908d5f4cb3d0a
6
+ metadata.gz: 0d7882fac72223f16d7a3881209b557b7c7ffd52c89bcad8b41e404084afb1fe0fba70d1f646dcf68dc23fecb1867247aaa793488239859c7c9424711a7be4dd
7
+ data.tar.gz: 6f69f046aa8b08b2e2a8e8dbb3ad52c5145b97f1967b8fdd013f9c006ce4162b7653efb9dac2225c3181359d2725229b7881aa7743c4d966dad7494254d56b73
data/README.md CHANGED
@@ -22,16 +22,16 @@ The PayPal Server SDK provides integration access to the PayPal REST APIs. The A
22
22
  Install the gem from the command line:
23
23
 
24
24
  ```bash
25
- gem install paypal-server-sdk -v 2.2.0
25
+ gem install paypal-server-sdk -v 2.3.0
26
26
  ```
27
27
 
28
28
  Or add the gem to your Gemfile and run `bundle`:
29
29
 
30
30
  ```ruby
31
- gem 'paypal-server-sdk', '2.2.0'
31
+ gem 'paypal-server-sdk', '2.3.0'
32
32
  ```
33
33
 
34
- For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/2.2.0).
34
+ For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/2.3.0).
35
35
 
36
36
  ## IRB Console Usage
37
37
 
@@ -70,13 +70,13 @@ ruby bin/console
70
70
 
71
71
  ## Initialize the API Client
72
72
 
73
- **_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/client.md)
73
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/client.md)
74
74
 
75
75
  The following parameters are configurable for the API Client:
76
76
 
77
77
  | Parameter | Type | Description |
78
78
  | --- | --- | --- |
79
- | environment | `Environment` | The API environment. <br> **Default: `Environment.SANDBOX`** |
79
+ | environment | [`Environment`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/README.md#environments) | The API environment. <br> **Default: `Environment.SANDBOX`** |
80
80
  | connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
81
81
  | adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
82
82
  | timeout | `Float` | The value to use for connection timeout. <br> **Default: 60** |
@@ -86,9 +86,9 @@ The following parameters are configurable for the API Client:
86
86
  | retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
87
87
  | retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
88
88
  | http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
89
- | proxy_settings | [`ProxySettings`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
90
- | logging_configuration | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
91
- | client_credentials_auth_credentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
89
+ | proxy_settings | [`ProxySettings`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
90
+ | logging_configuration | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
91
+ | client_credentials_auth_credentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
92
92
 
93
93
  The API client can be initialized as follows:
94
94
 
@@ -126,7 +126,7 @@ include PaypalServerSdk
126
126
  client = Client.from_env
127
127
  ```
128
128
 
129
- See the [`Environment-Based Client Initialization`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/environment-based-client-initialization.md) section for details.
129
+ See the [`Environment-Based Client Initialization`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/environment-based-client-initialization.md) section for details.
130
130
 
131
131
  ## Environments
132
132
 
@@ -136,42 +136,42 @@ The SDK can be configured to use a different environment for making API calls. A
136
136
 
137
137
  | Name | Description |
138
138
  | --- | --- |
139
- | Production | PayPal Live Environment |
140
- | Sandbox | **Default** PayPal Sandbox Environment |
139
+ | PRODUCTION | PayPal Live Environment |
140
+ | SANDBOX | **Default** PayPal Sandbox Environment |
141
141
 
142
142
  ## Authorization
143
143
 
144
144
  This API uses the following authentication schemes.
145
145
 
146
- * [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/auth/oauth-2-client-credentials-grant.md)
146
+ * [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/auth/oauth-2-client-credentials-grant.md)
147
147
 
148
148
  ## List of APIs
149
149
 
150
- * [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/controllers/orders.md)
151
- * [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/controllers/payments.md)
152
- * [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/controllers/vault.md)
153
- * [Transaction Search](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/controllers/transaction-search.md)
154
- * [Subscriptions](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/controllers/subscriptions.md)
150
+ * [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/controllers/orders.md)
151
+ * [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/controllers/payments.md)
152
+ * [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/controllers/vault.md)
153
+ * [Transaction Search](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/controllers/transaction-search.md)
154
+ * [Subscriptions](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/controllers/subscriptions.md)
155
155
 
156
156
  ## SDK Infrastructure
157
157
 
158
158
  ### Configuration
159
159
 
160
- * [ProxySettings](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/proxy-settings.md)
161
- * [Environment-Based Client Initialization](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/environment-based-client-initialization.md)
162
- * [AbstractLogger](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/abstract-logger.md)
163
- * [LoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/logging-configuration.md)
164
- * [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/request-logging-configuration.md)
165
- * [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/response-logging-configuration.md)
160
+ * [ProxySettings](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/proxy-settings.md)
161
+ * [Environment-Based Client Initialization](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/environment-based-client-initialization.md)
162
+ * [AbstractLogger](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/abstract-logger.md)
163
+ * [LoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/logging-configuration.md)
164
+ * [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/request-logging-configuration.md)
165
+ * [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/response-logging-configuration.md)
166
166
 
167
167
  ### HTTP
168
168
 
169
- * [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/http-response.md)
170
- * [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/http-request.md)
169
+ * [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/http-response.md)
170
+ * [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/http-request.md)
171
171
 
172
172
  ### Utilities
173
173
 
174
- * [ApiResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/api-response.md)
175
- * [ApiHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/api-helper.md)
176
- * [DateTimeHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.2.0/doc/date-time-helper.md)
174
+ * [ApiResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/api-response.md)
175
+ * [ApiHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/api-helper.md)
176
+ * [DateTimeHelper](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/2.3.0/doc/date-time-helper.md)
177
177
 
@@ -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: 2.2.0, on OS {os-info}'
13
+ 'PayPal REST API Ruby SDK, Version: 2.3.0, on OS {os-info}'
14
14
  end
15
15
 
16
16
  def self.user_agent_parameters
@@ -50,8 +50,8 @@ module PaypalServerSdk
50
50
  # values must be URL encoded.
51
51
  # @param [String] transaction_currency Optional parameter: Filters the
52
52
  # transactions in the response by a [three-character ISO-4217 currency
53
- # code](/api/rest/reference/currency-codes/) for the PayPal transaction
54
- # currency.
53
+ # code](https://developer.paypal.com/api/rest/reference/currency-codes/) for
54
+ # the PayPal transaction currency.
55
55
  # @param [String] payment_instrument_type Optional parameter: Filters the
56
56
  # transactions in the response by a payment instrument type. Value is
57
57
  # either: CREDITCARD. Returns a direct credit card transaction with a
@@ -143,8 +143,8 @@ module PaypalServerSdk
143
143
  # in the system when not provided.
144
144
  # @param [String] currency_code Optional parameter: Filters the transactions
145
145
  # in the response by a [three-character ISO-4217 currency
146
- # code](/api/rest/reference/currency-codes/) for the PayPal transaction
147
- # currency.
146
+ # code](https://developer.paypal.com/api/rest/reference/currency-codes/) for
147
+ # the PayPal transaction currency.
148
148
  # @return [ApiResponse] Complete http response with raw body and status code.
149
149
  def search_balances(options = {})
150
150
  @api_call
@@ -26,7 +26,7 @@ module PaypalServerSdk
26
26
  attr_accessor :details
27
27
 
28
28
  # An array of request-related [HATEOAS
29
- # links](/api/rest/responses/#hateoas-links).
29
+ # links](https://developer.paypal.com/api/rest/responses/#hateoas-links).
30
30
  # @return [Array[LinkDescription]]
31
31
  attr_accessor :links
32
32
 
@@ -31,7 +31,7 @@ module PaypalServerSdk
31
31
  attr_accessor :details
32
32
 
33
33
  # An array of request-related [HATEOAS
34
- # links](/api/rest/responses/#hateoas-links).
34
+ # links](https://developer.paypal.com/api/rest/responses/#hateoas-links).
35
35
  # @return [Array[LinkDescription]]
36
36
  attr_accessor :links
37
37
 
@@ -42,7 +42,8 @@ module PaypalServerSdk
42
42
  # @return [String]
43
43
  attr_accessor :postal_code
44
44
 
45
- # The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that
45
+ # The [2-character ISO 3166-1
46
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
46
47
  # identifies the country or region. Note: The country code for Great Britain
47
48
  # is GB and not UK as used in the top-level domain names for that country.
48
49
  # Use the `C2` country code for China worldwide for comparable uncontrolled
@@ -16,7 +16,8 @@ module PaypalServerSdk
16
16
  private_constant :SKIP
17
17
 
18
18
  # The [three-character ISO-4217 currency
19
- # code](/api/rest/reference/currency-codes/) that identifies the currency.
19
+ # code](https://developer.paypal.com/api/rest/reference/currency-codes/)
20
+ # that identifies the currency.
20
21
  # @return [String]
21
22
  attr_accessor :currency_code
22
23
 
@@ -24,7 +25,7 @@ module PaypalServerSdk
24
25
  # not typically fractional. A decimal fraction for currencies like `TND`
25
26
  # that are subdivided into thousandths. For the required number of decimal
26
27
  # places for a currency code, see [Currency
27
- # Codes](/api/rest/reference/currency-codes/).
28
+ # Codes](https://developer.paypal.com/api/rest/reference/currency-codes/).
28
29
  # @return [String]
29
30
  attr_accessor :value
30
31
 
@@ -73,11 +73,12 @@ module PaypalServerSdk
73
73
  # @return [Address]
74
74
  attr_accessor :billing_address
75
75
 
76
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
77
- # that identifies the country or region. Note: The country code for Great
78
- # Britain is GB and not UK as used in the top-level domain names for that
79
- # country. Use the `C2` country code for China worldwide for comparable
80
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
76
+ # The [two-character ISO 3166-1
77
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
78
+ # identifies the country or region. Note: The country code for Great Britain
79
+ # is GB and not UK as used in the top-level domain names for that country.
80
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
81
+ # price (CUP) method, bank card, and cross-border transactions.
81
82
  # @return [String]
82
83
  attr_accessor :country_code
83
84
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24
 
@@ -19,11 +19,12 @@ module PaypalServerSdk
19
19
  # @return [String]
20
20
  attr_accessor :issuing_bank
21
21
 
22
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
23
- # that identifies the country or region. Note: The country code for Great
24
- # Britain is GB and not UK as used in the top-level domain names for that
25
- # country. Use the `C2` country code for China worldwide for comparable
26
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
22
+ # The [two-character ISO 3166-1
23
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
24
+ # identifies the country or region. Note: The country code for Great Britain
25
+ # is GB and not UK as used in the top-level domain names for that country.
26
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
27
+ # price (CUP) method, bank card, and cross-border transactions.
27
28
  # @return [String]
28
29
  attr_accessor :bin_country_code
29
30
 
@@ -22,8 +22,9 @@ module PaypalServerSdk
22
22
  # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php),
23
23
  # the optional [ISO-15924 script
24
24
  # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166
25
- # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region
26
- # code](https://unstats.un.org/unsd/methodology/m49/).
25
+ # alpha-2 country
26
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) or
27
+ # [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
27
28
  # @return [String]
28
29
  attr_accessor :locale
29
30
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24
 
@@ -37,7 +37,8 @@ module PaypalServerSdk
37
37
  # @return [String]
38
38
  attr_accessor :postal_code
39
39
 
40
- # The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that
40
+ # The [2-character ISO 3166-1
41
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
41
42
  # identifies the country or region. Note: The country code for Great Britain
42
43
  # is GB and not UK as used in the top-level domain names for that country.
43
44
  # Use the `C2` country code for China worldwide for comparable uncontrolled
@@ -29,7 +29,8 @@ module PaypalServerSdk
29
29
  attr_accessor :expiry
30
30
 
31
31
  # The [three-character ISO-4217 currency
32
- # code](/api/rest/reference/currency-codes/) that identifies the currency.
32
+ # code](https://developer.paypal.com/api/rest/reference/currency-codes/)
33
+ # that identifies the currency.
33
34
  # @return [String]
34
35
  attr_accessor :currency_code
35
36
 
@@ -14,6 +14,10 @@ module PaypalServerSdk
14
14
  # @return [PaymentSource]
15
15
  attr_accessor :payment_source
16
16
 
17
+ # The instruction to process an order.
18
+ # @return [ProcessingInstruction]
19
+ attr_accessor :processing_instruction
20
+
17
21
  # Customizes the payer confirmation experience.
18
22
  # @return [OrderConfirmApplicationContext]
19
23
  attr_accessor :application_context
@@ -22,6 +26,7 @@ module PaypalServerSdk
22
26
  def self.names
23
27
  @_hash = {} if @_hash.nil?
24
28
  @_hash['payment_source'] = 'payment_source'
29
+ @_hash['processing_instruction'] = 'processing_instruction'
25
30
  @_hash['application_context'] = 'application_context'
26
31
  @_hash
27
32
  end
@@ -29,6 +34,7 @@ module PaypalServerSdk
29
34
  # An array for optional fields
30
35
  def self.optionals
31
36
  %w[
37
+ processing_instruction
32
38
  application_context
33
39
  ]
34
40
  end
@@ -38,8 +44,10 @@ module PaypalServerSdk
38
44
  []
39
45
  end
40
46
 
41
- def initialize(payment_source:, application_context: SKIP)
47
+ def initialize(payment_source:, processing_instruction: SKIP,
48
+ application_context: SKIP)
42
49
  @payment_source = payment_source
50
+ @processing_instruction = processing_instruction unless processing_instruction == SKIP
43
51
  @application_context = application_context unless application_context == SKIP
44
52
  end
45
53
 
@@ -49,26 +57,29 @@ module PaypalServerSdk
49
57
 
50
58
  # Extract variables from the hash.
51
59
  payment_source = PaymentSource.from_hash(hash['payment_source']) if hash['payment_source']
60
+ processing_instruction =
61
+ hash.key?('processing_instruction') ? hash['processing_instruction'] : SKIP
52
62
  application_context = OrderConfirmApplicationContext.from_hash(hash['application_context']) if
53
63
  hash['application_context']
54
64
 
55
65
  # Create object from extracted values.
56
66
  ConfirmOrderRequest.new(payment_source: payment_source,
67
+ processing_instruction: processing_instruction,
57
68
  application_context: application_context)
58
69
  end
59
70
 
60
71
  # Provides a human-readable string representation of the object.
61
72
  def to_s
62
73
  class_name = self.class.name.split('::').last
63
- "<#{class_name} payment_source: #{@payment_source}, application_context:"\
64
- " #{@application_context}>"
74
+ "<#{class_name} payment_source: #{@payment_source}, processing_instruction:"\
75
+ " #{@processing_instruction}, application_context: #{@application_context}>"
65
76
  end
66
77
 
67
78
  # Provides a debugging-friendly string with detailed object information.
68
79
  def inspect
69
80
  class_name = self.class.name.split('::').last
70
- "<#{class_name} payment_source: #{@payment_source.inspect}, application_context:"\
71
- " #{@application_context.inspect}>"
81
+ "<#{class_name} payment_source: #{@payment_source.inspect}, processing_instruction:"\
82
+ " #{@processing_instruction.inspect}, application_context: #{@application_context.inspect}>"
72
83
  end
73
84
  end
74
85
  end
@@ -27,7 +27,8 @@ module PaypalServerSdk
27
27
  # @return [Array[PaymentTokenResponse]]
28
28
  attr_accessor :payment_tokens
29
29
 
30
- # An array of related [HATEOAS links](/api/rest/responses/#hateoas).
30
+ # An array of related [HATEOAS
31
+ # links](https://developer.paypal.com/api/rest/responses/#hateoas).
31
32
  # @return [Array[LinkDescription]]
32
33
  attr_accessor :links
33
34
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24
 
@@ -28,9 +28,9 @@ module PaypalServerSdk
28
28
  attr_accessor :issue
29
29
 
30
30
  # An array of request-related [HATEOAS
31
- # links](/api/rest/responses/#hateoas-links) that are either relevant to the
32
- # issue by providing additional information or offering potential
33
- # resolutions.
31
+ # links](https://developer.paypal.com/api/rest/responses/#hateoas-links)
32
+ # that are either relevant to the issue by providing additional information
33
+ # or offering potential resolutions.
34
34
  # @return [Array[LinkDescription]]
35
35
  attr_accessor :links
36
36
 
@@ -11,12 +11,14 @@ module PaypalServerSdk
11
11
  private_constant :SKIP
12
12
 
13
13
  # The [three-character ISO-4217 currency
14
- # code](/api/rest/reference/currency-codes/) that identifies the currency.
14
+ # code](https://developer.paypal.com/api/rest/reference/currency-codes/)
15
+ # that identifies the currency.
15
16
  # @return [String]
16
17
  attr_accessor :source_currency
17
18
 
18
19
  # The [three-character ISO-4217 currency
19
- # code](/api/rest/reference/currency-codes/) that identifies the currency.
20
+ # code](https://developer.paypal.com/api/rest/reference/currency-codes/)
21
+ # that identifies the currency.
20
22
  # @return [String]
21
23
  attr_accessor :target_currency
22
24
 
@@ -21,8 +21,9 @@ module PaypalServerSdk
21
21
  # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php),
22
22
  # the optional [ISO-15924 script
23
23
  # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166
24
- # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region
25
- # code](https://unstats.un.org/unsd/methodology/m49/).
24
+ # alpha-2 country
25
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) or
26
+ # [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
26
27
  # @return [String]
27
28
  attr_accessor :locale
28
29
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24
 
@@ -13,11 +13,12 @@ module PaypalServerSdk
13
13
  # @return [String]
14
14
  attr_accessor :name
15
15
 
16
- # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
17
- # that identifies the country or region. Note: The country code for Great
18
- # Britain is GB and not UK as used in the top-level domain names for that
19
- # country. Use the `C2` country code for China worldwide for comparable
20
- # uncontrolled price (CUP) method, bank card, and cross-border transactions.
16
+ # The [two-character ISO 3166-1
17
+ # code](https://developer.paypal.com/api/rest/reference/country-codes/) that
18
+ # identifies the country or region. Note: The country code for Great Britain
19
+ # is GB and not UK as used in the top-level domain names for that country.
20
+ # Use the `C2` country code for China worldwide for comparable uncontrolled
21
+ # price (CUP) method, bank card, and cross-border transactions.
21
22
  # @return [String]
22
23
  attr_accessor :country_code
23
24