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.
- checksums.yaml +4 -4
- data/README.md +28 -28
- data/lib/paypal_server_sdk/controllers/base_controller.rb +1 -1
- data/lib/paypal_server_sdk/controllers/transaction_search_controller.rb +4 -4
- data/lib/paypal_server_sdk/exceptions/error_exception.rb +1 -1
- data/lib/paypal_server_sdk/exceptions/subscription_error_exception.rb +1 -1
- data/lib/paypal_server_sdk/models/address.rb +2 -1
- data/lib/paypal_server_sdk/models/amount_with_breakdown.rb +3 -2
- data/lib/paypal_server_sdk/models/apple_pay_card_response.rb +6 -5
- data/lib/paypal_server_sdk/models/bancontact_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/bancontact_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/bin_details.rb +6 -5
- data/lib/paypal_server_sdk/models/blik_experience_context.rb +3 -2
- data/lib/paypal_server_sdk/models/blik_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/blik_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/card_response_address.rb +2 -1
- data/lib/paypal_server_sdk/models/card_response_with_billing_address.rb +2 -1
- data/lib/paypal_server_sdk/models/confirm_order_request.rb +16 -5
- data/lib/paypal_server_sdk/models/customer_vault_payment_tokens_response.rb +2 -1
- data/lib/paypal_server_sdk/models/eps_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/eps_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/error_details.rb +3 -3
- data/lib/paypal_server_sdk/models/exchange_rate.rb +4 -2
- data/lib/paypal_server_sdk/models/experience_context.rb +3 -2
- data/lib/paypal_server_sdk/models/giropay_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/giropay_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/ideal_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/ideal_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/link_description.rb +6 -1
- data/lib/paypal_server_sdk/models/money.rb +3 -2
- data/lib/paypal_server_sdk/models/mybank_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/mybank_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/order.rb +18 -5
- data/lib/paypal_server_sdk/models/order_authorize_response.rb +18 -5
- data/lib/paypal_server_sdk/models/order_confirm_application_context.rb +3 -2
- data/lib/paypal_server_sdk/models/order_request.rb +17 -5
- data/lib/paypal_server_sdk/models/p24_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/p24_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/payment_token_response.rb +2 -1
- data/lib/paypal_server_sdk/models/paypal_wallet_experience_context.rb +3 -2
- data/lib/paypal_server_sdk/models/processing_instruction.rb +33 -0
- data/lib/paypal_server_sdk/models/search_response.rb +1 -1
- data/lib/paypal_server_sdk/models/sepa_debit_experience_context.rb +3 -2
- data/lib/paypal_server_sdk/models/setup_token_response.rb +2 -1
- data/lib/paypal_server_sdk/models/sofort_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/sofort_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/trustly_payment_object.rb +6 -5
- data/lib/paypal_server_sdk/models/trustly_payment_request.rb +6 -5
- data/lib/paypal_server_sdk/models/vault_card_experience_context.rb +3 -2
- data/lib/paypal_server_sdk/models/vault_experience_context.rb +3 -2
- data/lib/paypal_server_sdk.rb +1 -0
- metadata +3 -2
|
@@ -13,11 +13,12 @@ module PaypalServerSdk
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
attr_accessor :name
|
|
15
15
|
|
|
16
|
-
# The [two-character ISO 3166-1
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
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
|
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
# ( https://www.apimatic.io ).
|
|
5
5
|
|
|
6
6
|
module PaypalServerSdk
|
|
7
|
-
# The request-related [HATEOAS
|
|
7
|
+
# The request-related [HATEOAS
|
|
8
|
+
# link](https://developer.paypal.com/api/rest/responses/#hateoas-links)
|
|
9
|
+
# information., The request-related [HATEOAS
|
|
10
|
+
# link](/api/rest/responses/#hateoas-links) information., The request-related
|
|
11
|
+
# [HATEOAS
|
|
12
|
+
# link](https://developer.paypal.com/api/rest/responses/#hateoas-links)
|
|
8
13
|
# information.
|
|
9
14
|
class LinkDescription < BaseModel
|
|
10
15
|
SKIP = Object.new
|
|
@@ -11,7 +11,8 @@ module PaypalServerSdk
|
|
|
11
11
|
private_constant :SKIP
|
|
12
12
|
|
|
13
13
|
# The [three-character ISO-4217 currency
|
|
14
|
-
# code](/api/rest/reference/currency-codes/)
|
|
14
|
+
# code](https://developer.paypal.com/api/rest/reference/currency-codes/)
|
|
15
|
+
# that identifies the currency.
|
|
15
16
|
# @return [String]
|
|
16
17
|
attr_accessor :currency_code
|
|
17
18
|
|
|
@@ -19,7 +20,7 @@ module PaypalServerSdk
|
|
|
19
20
|
# not typically fractional. A decimal fraction for currencies like `TND`
|
|
20
21
|
# that are subdivided into thousandths. For the required number of decimal
|
|
21
22
|
# places for a currency code, see [Currency
|
|
22
|
-
# Codes](/api/rest/reference/currency-codes/).
|
|
23
|
+
# Codes](https://developer.paypal.com/api/rest/reference/currency-codes/).
|
|
23
24
|
# @return [String]
|
|
24
25
|
attr_accessor :value
|
|
25
26
|
|
|
@@ -13,11 +13,12 @@ module PaypalServerSdk
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
attr_accessor :name
|
|
15
15
|
|
|
16
|
-
# The [two-character ISO 3166-1
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
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
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
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
|
|
|
@@ -36,6 +36,10 @@ module PaypalServerSdk
|
|
|
36
36
|
# @return [CheckoutPaymentIntent]
|
|
37
37
|
attr_accessor :intent
|
|
38
38
|
|
|
39
|
+
# The instruction to process an order.
|
|
40
|
+
# @return [ProcessingInstruction]
|
|
41
|
+
attr_accessor :processing_instruction
|
|
42
|
+
|
|
39
43
|
# DEPRECATED. The customer is also known as the payer. The Payer object was
|
|
40
44
|
# intended to only be used with the `payment_source.paypal` object. In order
|
|
41
45
|
# to make this design more clear, the details in the `payer` object are now
|
|
@@ -77,6 +81,7 @@ module PaypalServerSdk
|
|
|
77
81
|
@_hash['id'] = 'id'
|
|
78
82
|
@_hash['payment_source'] = 'payment_source'
|
|
79
83
|
@_hash['intent'] = 'intent'
|
|
84
|
+
@_hash['processing_instruction'] = 'processing_instruction'
|
|
80
85
|
@_hash['payer'] = 'payer'
|
|
81
86
|
@_hash['purchase_units'] = 'purchase_units'
|
|
82
87
|
@_hash['status'] = 'status'
|
|
@@ -92,6 +97,7 @@ module PaypalServerSdk
|
|
|
92
97
|
id
|
|
93
98
|
payment_source
|
|
94
99
|
intent
|
|
100
|
+
processing_instruction
|
|
95
101
|
payer
|
|
96
102
|
purchase_units
|
|
97
103
|
status
|
|
@@ -105,13 +111,15 @@ module PaypalServerSdk
|
|
|
105
111
|
end
|
|
106
112
|
|
|
107
113
|
def initialize(create_time: SKIP, update_time: SKIP, id: SKIP,
|
|
108
|
-
payment_source: SKIP, intent: SKIP,
|
|
114
|
+
payment_source: SKIP, intent: SKIP,
|
|
115
|
+
processing_instruction: SKIP, payer: SKIP,
|
|
109
116
|
purchase_units: SKIP, status: SKIP, links: SKIP)
|
|
110
117
|
@create_time = create_time unless create_time == SKIP
|
|
111
118
|
@update_time = update_time unless update_time == SKIP
|
|
112
119
|
@id = id unless id == SKIP
|
|
113
120
|
@payment_source = payment_source unless payment_source == SKIP
|
|
114
121
|
@intent = intent unless intent == SKIP
|
|
122
|
+
@processing_instruction = processing_instruction unless processing_instruction == SKIP
|
|
115
123
|
@payer = payer unless payer == SKIP
|
|
116
124
|
@purchase_units = purchase_units unless purchase_units == SKIP
|
|
117
125
|
@status = status unless status == SKIP
|
|
@@ -129,6 +137,8 @@ module PaypalServerSdk
|
|
|
129
137
|
payment_source = PaymentSourceResponse.from_hash(hash['payment_source']) if
|
|
130
138
|
hash['payment_source']
|
|
131
139
|
intent = hash.key?('intent') ? hash['intent'] : SKIP
|
|
140
|
+
processing_instruction =
|
|
141
|
+
hash.key?('processing_instruction') ? hash['processing_instruction'] : SKIP
|
|
132
142
|
payer = Payer.from_hash(hash['payer']) if hash['payer']
|
|
133
143
|
# Parameter is an array, so we need to iterate through it
|
|
134
144
|
purchase_units = nil
|
|
@@ -158,6 +168,7 @@ module PaypalServerSdk
|
|
|
158
168
|
id: id,
|
|
159
169
|
payment_source: payment_source,
|
|
160
170
|
intent: intent,
|
|
171
|
+
processing_instruction: processing_instruction,
|
|
161
172
|
payer: payer,
|
|
162
173
|
purchase_units: purchase_units,
|
|
163
174
|
status: status,
|
|
@@ -168,8 +179,9 @@ module PaypalServerSdk
|
|
|
168
179
|
def to_s
|
|
169
180
|
class_name = self.class.name.split('::').last
|
|
170
181
|
"<#{class_name} create_time: #{@create_time}, update_time: #{@update_time}, id: #{@id},"\
|
|
171
|
-
" payment_source: #{@payment_source}, intent: #{@intent},
|
|
172
|
-
" #{@
|
|
182
|
+
" payment_source: #{@payment_source}, intent: #{@intent}, processing_instruction:"\
|
|
183
|
+
" #{@processing_instruction}, payer: #{@payer}, purchase_units: #{@purchase_units}, status:"\
|
|
184
|
+
" #{@status}, links: #{@links}>"
|
|
173
185
|
end
|
|
174
186
|
|
|
175
187
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -177,8 +189,9 @@ module PaypalServerSdk
|
|
|
177
189
|
class_name = self.class.name.split('::').last
|
|
178
190
|
"<#{class_name} create_time: #{@create_time.inspect}, update_time: #{@update_time.inspect},"\
|
|
179
191
|
" id: #{@id.inspect}, payment_source: #{@payment_source.inspect}, intent:"\
|
|
180
|
-
" #{@intent.inspect},
|
|
181
|
-
"
|
|
192
|
+
" #{@intent.inspect}, processing_instruction: #{@processing_instruction.inspect}, payer:"\
|
|
193
|
+
" #{@payer.inspect}, purchase_units: #{@purchase_units.inspect}, status: #{@status.inspect},"\
|
|
194
|
+
" links: #{@links.inspect}>"
|
|
182
195
|
end
|
|
183
196
|
end
|
|
184
197
|
end
|
|
@@ -36,6 +36,10 @@ module PaypalServerSdk
|
|
|
36
36
|
# @return [CheckoutPaymentIntent]
|
|
37
37
|
attr_accessor :intent
|
|
38
38
|
|
|
39
|
+
# The instruction to process an order.
|
|
40
|
+
# @return [ProcessingInstruction]
|
|
41
|
+
attr_accessor :processing_instruction
|
|
42
|
+
|
|
39
43
|
# The customer who approves and pays for the order. The customer is also
|
|
40
44
|
# known as the payer.
|
|
41
45
|
# @return [Payer]
|
|
@@ -74,6 +78,7 @@ module PaypalServerSdk
|
|
|
74
78
|
@_hash['id'] = 'id'
|
|
75
79
|
@_hash['payment_source'] = 'payment_source'
|
|
76
80
|
@_hash['intent'] = 'intent'
|
|
81
|
+
@_hash['processing_instruction'] = 'processing_instruction'
|
|
77
82
|
@_hash['payer'] = 'payer'
|
|
78
83
|
@_hash['purchase_units'] = 'purchase_units'
|
|
79
84
|
@_hash['status'] = 'status'
|
|
@@ -89,6 +94,7 @@ module PaypalServerSdk
|
|
|
89
94
|
id
|
|
90
95
|
payment_source
|
|
91
96
|
intent
|
|
97
|
+
processing_instruction
|
|
92
98
|
payer
|
|
93
99
|
purchase_units
|
|
94
100
|
status
|
|
@@ -102,13 +108,15 @@ module PaypalServerSdk
|
|
|
102
108
|
end
|
|
103
109
|
|
|
104
110
|
def initialize(create_time: SKIP, update_time: SKIP, id: SKIP,
|
|
105
|
-
payment_source: SKIP, intent: SKIP,
|
|
111
|
+
payment_source: SKIP, intent: SKIP,
|
|
112
|
+
processing_instruction: SKIP, payer: SKIP,
|
|
106
113
|
purchase_units: SKIP, status: SKIP, links: SKIP)
|
|
107
114
|
@create_time = create_time unless create_time == SKIP
|
|
108
115
|
@update_time = update_time unless update_time == SKIP
|
|
109
116
|
@id = id unless id == SKIP
|
|
110
117
|
@payment_source = payment_source unless payment_source == SKIP
|
|
111
118
|
@intent = intent unless intent == SKIP
|
|
119
|
+
@processing_instruction = processing_instruction unless processing_instruction == SKIP
|
|
112
120
|
@payer = payer unless payer == SKIP
|
|
113
121
|
@purchase_units = purchase_units unless purchase_units == SKIP
|
|
114
122
|
@status = status unless status == SKIP
|
|
@@ -126,6 +134,8 @@ module PaypalServerSdk
|
|
|
126
134
|
payment_source = OrderAuthorizeResponsePaymentSource.from_hash(hash['payment_source']) if
|
|
127
135
|
hash['payment_source']
|
|
128
136
|
intent = hash.key?('intent') ? hash['intent'] : SKIP
|
|
137
|
+
processing_instruction =
|
|
138
|
+
hash.key?('processing_instruction') ? hash['processing_instruction'] : SKIP
|
|
129
139
|
payer = Payer.from_hash(hash['payer']) if hash['payer']
|
|
130
140
|
# Parameter is an array, so we need to iterate through it
|
|
131
141
|
purchase_units = nil
|
|
@@ -155,6 +165,7 @@ module PaypalServerSdk
|
|
|
155
165
|
id: id,
|
|
156
166
|
payment_source: payment_source,
|
|
157
167
|
intent: intent,
|
|
168
|
+
processing_instruction: processing_instruction,
|
|
158
169
|
payer: payer,
|
|
159
170
|
purchase_units: purchase_units,
|
|
160
171
|
status: status,
|
|
@@ -165,8 +176,9 @@ module PaypalServerSdk
|
|
|
165
176
|
def to_s
|
|
166
177
|
class_name = self.class.name.split('::').last
|
|
167
178
|
"<#{class_name} create_time: #{@create_time}, update_time: #{@update_time}, id: #{@id},"\
|
|
168
|
-
" payment_source: #{@payment_source}, intent: #{@intent},
|
|
169
|
-
" #{@
|
|
179
|
+
" payment_source: #{@payment_source}, intent: #{@intent}, processing_instruction:"\
|
|
180
|
+
" #{@processing_instruction}, payer: #{@payer}, purchase_units: #{@purchase_units}, status:"\
|
|
181
|
+
" #{@status}, links: #{@links}>"
|
|
170
182
|
end
|
|
171
183
|
|
|
172
184
|
# Provides a debugging-friendly string with detailed object information.
|
|
@@ -174,8 +186,9 @@ module PaypalServerSdk
|
|
|
174
186
|
class_name = self.class.name.split('::').last
|
|
175
187
|
"<#{class_name} create_time: #{@create_time.inspect}, update_time: #{@update_time.inspect},"\
|
|
176
188
|
" id: #{@id.inspect}, payment_source: #{@payment_source.inspect}, intent:"\
|
|
177
|
-
" #{@intent.inspect},
|
|
178
|
-
"
|
|
189
|
+
" #{@intent.inspect}, processing_instruction: #{@processing_instruction.inspect}, payer:"\
|
|
190
|
+
" #{@payer.inspect}, purchase_units: #{@purchase_units.inspect}, status: #{@status.inspect},"\
|
|
191
|
+
" links: #{@links.inspect}>"
|
|
179
192
|
end
|
|
180
193
|
end
|
|
181
194
|
end
|
|
@@ -20,8 +20,9 @@ module PaypalServerSdk
|
|
|
20
20
|
# language code](https://www.loc.gov/standards/iso639-2/php/code_list.php),
|
|
21
21
|
# the optional [ISO-15924 script
|
|
22
22
|
# tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166
|
|
23
|
-
# alpha-2 country
|
|
24
|
-
# code](https://
|
|
23
|
+
# alpha-2 country
|
|
24
|
+
# code](https://developer.paypal.com/api/rest/reference/country-codes/) or
|
|
25
|
+
# [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
|
|
25
26
|
# @return [String]
|
|
26
27
|
attr_accessor :locale
|
|
27
28
|
|
|
@@ -14,6 +14,10 @@ module PaypalServerSdk
|
|
|
14
14
|
# @return [CheckoutPaymentIntent]
|
|
15
15
|
attr_accessor :intent
|
|
16
16
|
|
|
17
|
+
# The instruction to process an order.
|
|
18
|
+
# @return [ProcessingInstruction]
|
|
19
|
+
attr_accessor :processing_instruction
|
|
20
|
+
|
|
17
21
|
# DEPRECATED. The customer is also known as the payer. The Payer object was
|
|
18
22
|
# intended to only be used with the `payment_source.paypal` object. In order
|
|
19
23
|
# to make this design more clear, the details in the `payer` object are now
|
|
@@ -43,6 +47,7 @@ module PaypalServerSdk
|
|
|
43
47
|
def self.names
|
|
44
48
|
@_hash = {} if @_hash.nil?
|
|
45
49
|
@_hash['intent'] = 'intent'
|
|
50
|
+
@_hash['processing_instruction'] = 'processing_instruction'
|
|
46
51
|
@_hash['payer'] = 'payer'
|
|
47
52
|
@_hash['purchase_units'] = 'purchase_units'
|
|
48
53
|
@_hash['payment_source'] = 'payment_source'
|
|
@@ -53,6 +58,7 @@ module PaypalServerSdk
|
|
|
53
58
|
# An array for optional fields
|
|
54
59
|
def self.optionals
|
|
55
60
|
%w[
|
|
61
|
+
processing_instruction
|
|
56
62
|
payer
|
|
57
63
|
payment_source
|
|
58
64
|
application_context
|
|
@@ -64,9 +70,10 @@ module PaypalServerSdk
|
|
|
64
70
|
[]
|
|
65
71
|
end
|
|
66
72
|
|
|
67
|
-
def initialize(intent:, purchase_units:,
|
|
68
|
-
application_context: SKIP)
|
|
73
|
+
def initialize(intent:, purchase_units:, processing_instruction: SKIP,
|
|
74
|
+
payer: SKIP, payment_source: SKIP, application_context: SKIP)
|
|
69
75
|
@intent = intent
|
|
76
|
+
@processing_instruction = processing_instruction unless processing_instruction == SKIP
|
|
70
77
|
@payer = payer unless payer == SKIP
|
|
71
78
|
@purchase_units = purchase_units
|
|
72
79
|
@payment_source = payment_source unless payment_source == SKIP
|
|
@@ -89,6 +96,8 @@ module PaypalServerSdk
|
|
|
89
96
|
end
|
|
90
97
|
|
|
91
98
|
purchase_units = nil unless hash.key?('purchase_units')
|
|
99
|
+
processing_instruction =
|
|
100
|
+
hash.key?('processing_instruction') ? hash['processing_instruction'] : SKIP
|
|
92
101
|
payer = Payer.from_hash(hash['payer']) if hash['payer']
|
|
93
102
|
payment_source = PaymentSource.from_hash(hash['payment_source']) if hash['payment_source']
|
|
94
103
|
application_context = OrderApplicationContext.from_hash(hash['application_context']) if
|
|
@@ -97,6 +106,7 @@ module PaypalServerSdk
|
|
|
97
106
|
# Create object from extracted values.
|
|
98
107
|
OrderRequest.new(intent: intent,
|
|
99
108
|
purchase_units: purchase_units,
|
|
109
|
+
processing_instruction: processing_instruction,
|
|
100
110
|
payer: payer,
|
|
101
111
|
payment_source: payment_source,
|
|
102
112
|
application_context: application_context)
|
|
@@ -105,14 +115,16 @@ module PaypalServerSdk
|
|
|
105
115
|
# Provides a human-readable string representation of the object.
|
|
106
116
|
def to_s
|
|
107
117
|
class_name = self.class.name.split('::').last
|
|
108
|
-
"<#{class_name} intent: #{@intent},
|
|
109
|
-
"
|
|
118
|
+
"<#{class_name} intent: #{@intent}, processing_instruction: #{@processing_instruction},"\
|
|
119
|
+
" payer: #{@payer}, purchase_units: #{@purchase_units}, payment_source: #{@payment_source},"\
|
|
120
|
+
" application_context: #{@application_context}>"
|
|
110
121
|
end
|
|
111
122
|
|
|
112
123
|
# Provides a debugging-friendly string with detailed object information.
|
|
113
124
|
def inspect
|
|
114
125
|
class_name = self.class.name.split('::').last
|
|
115
|
-
"<#{class_name} intent: #{@intent.inspect},
|
|
126
|
+
"<#{class_name} intent: #{@intent.inspect}, processing_instruction:"\
|
|
127
|
+
" #{@processing_instruction.inspect}, payer: #{@payer.inspect}, purchase_units:"\
|
|
116
128
|
" #{@purchase_units.inspect}, payment_source: #{@payment_source.inspect},"\
|
|
117
129
|
" application_context: #{@application_context.inspect}>"
|
|
118
130
|
end
|
|
@@ -20,11 +20,12 @@ module PaypalServerSdk
|
|
|
20
20
|
# @return [String]
|
|
21
21
|
attr_accessor :email
|
|
22
22
|
|
|
23
|
-
# The [two-character ISO 3166-1
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
23
|
+
# The [two-character ISO 3166-1
|
|
24
|
+
# code](https://developer.paypal.com/api/rest/reference/country-codes/) that
|
|
25
|
+
# identifies the country or region. Note: The country code for Great Britain
|
|
26
|
+
# is GB and not UK as used in the top-level domain names for that country.
|
|
27
|
+
# Use the `C2` country code for China worldwide for comparable uncontrolled
|
|
28
|
+
# price (CUP) method, bank card, and cross-border transactions.
|
|
28
29
|
# @return [String]
|
|
29
30
|
attr_accessor :country_code
|
|
30
31
|
|
|
@@ -20,11 +20,12 @@ module PaypalServerSdk
|
|
|
20
20
|
# @return [String]
|
|
21
21
|
attr_accessor :email
|
|
22
22
|
|
|
23
|
-
# The [two-character ISO 3166-1
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
23
|
+
# The [two-character ISO 3166-1
|
|
24
|
+
# code](https://developer.paypal.com/api/rest/reference/country-codes/) that
|
|
25
|
+
# identifies the country or region. Note: The country code for Great Britain
|
|
26
|
+
# is GB and not UK as used in the top-level domain names for that country.
|
|
27
|
+
# Use the `C2` country code for China worldwide for comparable uncontrolled
|
|
28
|
+
# price (CUP) method, bank card, and cross-border transactions.
|
|
28
29
|
# @return [String]
|
|
29
30
|
attr_accessor :country_code
|
|
30
31
|
|
|
@@ -23,7 +23,8 @@ module PaypalServerSdk
|
|
|
23
23
|
# @return [PaymentTokenResponsePaymentSource]
|
|
24
24
|
attr_accessor :payment_source
|
|
25
25
|
|
|
26
|
-
# An array of related [HATEOAS
|
|
26
|
+
# An array of related [HATEOAS
|
|
27
|
+
# links](https://developer.paypal.com/api/rest/responses/#hateoas).
|
|
27
28
|
# @return [Array[LinkDescription]]
|
|
28
29
|
attr_accessor :links
|
|
29
30
|
|
|
@@ -24,8 +24,9 @@ module PaypalServerSdk
|
|
|
24
24
|
# language code](https://www.loc.gov/standards/iso639-2/php/code_list.php),
|
|
25
25
|
# the optional [ISO-15924 script
|
|
26
26
|
# tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166
|
|
27
|
-
# alpha-2 country
|
|
28
|
-
# code](https://
|
|
27
|
+
# alpha-2 country
|
|
28
|
+
# code](https://developer.paypal.com/api/rest/reference/country-codes/) or
|
|
29
|
+
# [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
|
|
29
30
|
# @return [String]
|
|
30
31
|
attr_accessor :locale
|
|
31
32
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# paypal_server_sdk
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module PaypalServerSdk
|
|
7
|
+
# The instruction to process an order.
|
|
8
|
+
class ProcessingInstruction
|
|
9
|
+
PROCESSING_INSTRUCTION = [
|
|
10
|
+
# API Caller expects the Order to be auto completed (i.e. for PayPal to
|
|
11
|
+
# authorize or capture depending on the intent) on completion of payer
|
|
12
|
+
# approval. This option is not relevant for payment_source that typically
|
|
13
|
+
# do not require a payer approval or interaction. This option is currently
|
|
14
|
+
# only available for the following payment_source: Alipay, BANCOMAT Pay,
|
|
15
|
+
# Bancontact, BLIK, boletobancario, eps, giropay, GrabPay, iDEAL, MB WAY
|
|
16
|
+
# Multibanco, MyBank, OXXO, P24, PayU, PUI, SafetyPay, SatisPay, Swish,
|
|
17
|
+
# Sofort, Trustly, Verkkopankki, WeChat Pay
|
|
18
|
+
ORDER_COMPLETE_ON_PAYMENT_APPROVAL = 'ORDER_COMPLETE_ON_PAYMENT_APPROVAL'.freeze
|
|
19
|
+
].freeze
|
|
20
|
+
|
|
21
|
+
def self.validate(value)
|
|
22
|
+
return false if value.nil?
|
|
23
|
+
|
|
24
|
+
true
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.from_value(value, default_value = ORDER_COMPLETE_ON_PAYMENT_APPROVAL)
|
|
28
|
+
return default_value if value.nil?
|
|
29
|
+
|
|
30
|
+
default_value
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -53,7 +53,7 @@ module PaypalServerSdk
|
|
|
53
53
|
attr_accessor :total_pages
|
|
54
54
|
|
|
55
55
|
# An array of request-related [HATEOAS
|
|
56
|
-
# links](/api/rest/responses/#hateoas-links).
|
|
56
|
+
# links](https://developer.paypal.com/api/rest/responses/#hateoas-links).
|
|
57
57
|
# @return [Array[LinkDescription]]
|
|
58
58
|
attr_accessor :links
|
|
59
59
|
|
|
@@ -16,8 +16,9 @@ module PaypalServerSdk
|
|
|
16
16
|
# language code](https://www.loc.gov/standards/iso639-2/php/code_list.php),
|
|
17
17
|
# the optional [ISO-15924 script
|
|
18
18
|
# tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166
|
|
19
|
-
# alpha-2 country
|
|
20
|
-
# code](https://
|
|
19
|
+
# alpha-2 country
|
|
20
|
+
# code](https://developer.paypal.com/api/rest/reference/country-codes/) or
|
|
21
|
+
# [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
|
|
21
22
|
# @return [String]
|
|
22
23
|
attr_accessor :locale
|
|
23
24
|
|
|
@@ -28,7 +28,8 @@ module PaypalServerSdk
|
|
|
28
28
|
# @return [SetupTokenResponsePaymentSource]
|
|
29
29
|
attr_accessor :payment_source
|
|
30
30
|
|
|
31
|
-
# An array of related [HATEOAS
|
|
31
|
+
# An array of related [HATEOAS
|
|
32
|
+
# links](https://developer.paypal.com/api/rest/responses/#hateoas).
|
|
32
33
|
# @return [Array[LinkDescription]]
|
|
33
34
|
attr_accessor :links
|
|
34
35
|
|
|
@@ -13,11 +13,12 @@ module PaypalServerSdk
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
attr_accessor :name
|
|
15
15
|
|
|
16
|
-
# The [two-character ISO 3166-1
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
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
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
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
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
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
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
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
|
|
|
@@ -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
|
|
25
|
-
# code](https://
|
|
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
|
|
|
@@ -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
|
|
25
|
-
# code](https://
|
|
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
|
|
data/lib/paypal_server_sdk.rb
CHANGED
|
@@ -341,6 +341,7 @@ require_relative 'paypal_server_sdk/models/store_in_vault_instruction'
|
|
|
341
341
|
require_relative 'paypal_server_sdk/models/stored_payment_source_payment_type'
|
|
342
342
|
require_relative 'paypal_server_sdk/models/stored_payment_source_usage_type'
|
|
343
343
|
require_relative 'paypal_server_sdk/models/order_tracker_status'
|
|
344
|
+
require_relative 'paypal_server_sdk/models/processing_instruction'
|
|
344
345
|
require_relative 'paypal_server_sdk/models/apple_pay_payment_data_type'
|
|
345
346
|
require_relative 'paypal_server_sdk/models/authorization_incomplete_reason'
|
|
346
347
|
require_relative 'paypal_server_sdk/models/authorization_status'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paypal-server-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- PayPal
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: apimatic_core_interfaces
|
|
@@ -326,6 +326,7 @@ files:
|
|
|
326
326
|
- lib/paypal_server_sdk/models/pricing_model.rb
|
|
327
327
|
- lib/paypal_server_sdk/models/pricing_scheme.rb
|
|
328
328
|
- lib/paypal_server_sdk/models/pricing_tier.rb
|
|
329
|
+
- lib/paypal_server_sdk/models/processing_instruction.rb
|
|
329
330
|
- lib/paypal_server_sdk/models/processor_response.rb
|
|
330
331
|
- lib/paypal_server_sdk/models/processor_response_code.rb
|
|
331
332
|
- lib/paypal_server_sdk/models/purchase_unit.rb
|