pcp-server-ruby-sdk 1.4.0 → 1.5.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.
@@ -5,17 +5,25 @@ module PCPServerSDK
5
5
  module Models
6
6
  # Object containing information about the device of the end customer.
7
7
  class CustomerDevice
8
+ # The accept-header of the customer client from the HTTP Headers.
9
+ attr_accessor :accept_header
10
+
8
11
  # The IP address of the customer client from the HTTP Headers.
9
12
  attr_accessor :ip_address
10
13
 
11
14
  # Tokenized representation of the end customers device. For example used for PAYONE Buy Now, Pay Later (BNPL).
12
15
  attr_accessor :device_token
13
16
 
17
+ # User-Agent of the client device/browser from the HTTP Headers.
18
+ attr_accessor :user_agent
19
+
14
20
  # Attribute mapping from ruby-style variable name to JSON key.
15
21
  def self.attribute_map
16
22
  {
23
+ :'accept_header' => :'acceptHeader',
17
24
  :'ip_address' => :'ipAddress',
18
- :'device_token' => :'deviceToken'
25
+ :'device_token' => :'deviceToken',
26
+ :'user_agent' => :'userAgent'
19
27
  }
20
28
  end
21
29
 
@@ -27,8 +35,10 @@ module PCPServerSDK
27
35
  # Attribute type mapping.
28
36
  def self.openapi_types
29
37
  {
38
+ :'accept_header' => :'String',
30
39
  :'ip_address' => :'String',
31
- :'device_token' => :'String'
40
+ :'device_token' => :'String',
41
+ :'user_agent' => :'String'
32
42
  }
33
43
  end
34
44
 
@@ -53,6 +63,10 @@ module PCPServerSDK
53
63
  h[k.to_sym] = v
54
64
  }
55
65
 
66
+ if attributes.key?(:'accept_header')
67
+ self.accept_header = attributes[:'accept_header']
68
+ end
69
+
56
70
  if attributes.key?(:'ip_address')
57
71
  self.ip_address = attributes[:'ip_address']
58
72
  end
@@ -60,6 +74,10 @@ module PCPServerSDK
60
74
  if attributes.key?(:'device_token')
61
75
  self.device_token = attributes[:'device_token']
62
76
  end
77
+
78
+ if attributes.key?(:'user_agent')
79
+ self.user_agent = attributes[:'user_agent']
80
+ end
63
81
  end
64
82
 
65
83
  # Checks equality by comparing each attribute.
@@ -67,8 +85,10 @@ module PCPServerSDK
67
85
  def ==(o)
68
86
  return true if self.equal?(o)
69
87
  self.class == o.class &&
88
+ accept_header == o.accept_header &&
70
89
  ip_address == o.ip_address &&
71
- device_token == o.device_token
90
+ device_token == o.device_token &&
91
+ user_agent == o.user_agent
72
92
  end
73
93
 
74
94
  # @see the `==` method
@@ -80,7 +100,7 @@ module PCPServerSDK
80
100
  # Calculates hash code according to all attributes.
81
101
  # @return [Integer] Hash code
82
102
  def hash
83
- [ip_address, device_token].hash
103
+ [accept_header, ip_address, device_token, user_agent].hash
84
104
  end
85
105
 
86
106
  # Builds the object from hash
@@ -10,12 +10,13 @@ module PCPServerSDK
10
10
  CAPTURE = "CAPTURE".freeze
11
11
  REFUND = "REFUND".freeze
12
12
  REVERSAL = "REVERSAL".freeze
13
+ CHARGEBACK = "CHARGEBACK".freeze
13
14
  CHARGEBACK_REVERSAL = "CHARGEBACK_REVERSAL".freeze
14
15
  CREDIT_NOTE = "CREDIT_NOTE".freeze
15
16
  DEBIT_NOTE = "DEBIT_NOTE".freeze
16
17
 
17
18
  def self.all_vars
18
- @all_vars ||= [SALE, RESERVATION, CAPTURE, REFUND, REVERSAL, CHARGEBACK_REVERSAL, CREDIT_NOTE, DEBIT_NOTE].freeze
19
+ @all_vars ||= [SALE, RESERVATION, CAPTURE, REFUND, REVERSAL, CHARGEBACK, CHARGEBACK_REVERSAL, CREDIT_NOTE, DEBIT_NOTE].freeze
19
20
  end
20
21
 
21
22
  # Builds the enum from string
@@ -25,6 +25,9 @@ module PCPServerSDK
25
25
 
26
26
  attr_accessor :redirection_data
27
27
 
28
+ # Indicates whether the PayPal JavaScript SDK flow is used on the redirect level.
29
+ attr_accessor :java_script_sdk_flow
30
+
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
29
32
  def self.attribute_map
30
33
  {
@@ -34,7 +37,8 @@ module PCPServerSDK
34
37
  :'tokenize' => :'tokenize',
35
38
  :'payment_product_id' => :'paymentProductId',
36
39
  :'payment_product840_specific_input' => :'paymentProduct840SpecificInput',
37
- :'redirection_data' => :'redirectionData'
40
+ :'redirection_data' => :'redirectionData',
41
+ :'java_script_sdk_flow' => :'javaScriptSdkFlow'
38
42
  }
39
43
  end
40
44
 
@@ -52,7 +56,8 @@ module PCPServerSDK
52
56
  :'tokenize' => :'Boolean',
53
57
  :'payment_product_id' => :'Integer',
54
58
  :'payment_product840_specific_input' => :'RedirectPaymentProduct840SpecificInput',
55
- :'redirection_data' => :'RedirectionData'
59
+ :'redirection_data' => :'RedirectionData',
60
+ :'java_script_sdk_flow' => :'Boolean'
56
61
  }
57
62
  end
58
63
 
@@ -104,6 +109,10 @@ module PCPServerSDK
104
109
  if attributes.key?(:'redirection_data')
105
110
  self.redirection_data = attributes[:'redirection_data']
106
111
  end
112
+
113
+ if attributes.key?(:'java_script_sdk_flow')
114
+ self.java_script_sdk_flow = attributes[:'java_script_sdk_flow']
115
+ end
107
116
  end
108
117
 
109
118
  # Checks equality by comparing each attribute.
@@ -117,7 +126,8 @@ module PCPServerSDK
117
126
  tokenize == o.tokenize &&
118
127
  payment_product_id == o.payment_product_id &&
119
128
  payment_product840_specific_input == o.payment_product840_specific_input &&
120
- redirection_data == o.redirection_data
129
+ redirection_data == o.redirection_data &&
130
+ java_script_sdk_flow == o.java_script_sdk_flow
121
131
  end
122
132
 
123
133
  # @see the `==` method
@@ -129,7 +139,7 @@ module PCPServerSDK
129
139
  # Calculates hash code according to all attributes.
130
140
  # @return [Integer] Hash code
131
141
  def hash
132
- [requires_approval, payment_processing_token, reporting_token, tokenize, payment_product_id, payment_product840_specific_input, redirection_data].hash
142
+ [requires_approval, payment_processing_token, reporting_token, tokenize, payment_product_id, payment_product840_specific_input, redirection_data, java_script_sdk_flow].hash
133
143
  end
134
144
 
135
145
  # Builds the object from hash
@@ -17,13 +17,17 @@ module PCPServerSDK
17
17
  # Token to identify the card in the reporting.
18
18
  attr_accessor :reporting_token
19
19
 
20
+ # Indicates whether the PayPal JavaScript SDK flow was used for the redirect payment.
21
+ attr_accessor :java_script_sdk_flow
22
+
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
23
26
  :'payment_product_id' => :'paymentProductId',
24
27
  :'payment_product840_specific_output' => :'paymentProduct840SpecificOutput',
25
28
  :'payment_processing_token' => :'paymentProcessingToken',
26
- :'reporting_token' => :'reportingToken'
29
+ :'reporting_token' => :'reportingToken',
30
+ :'java_script_sdk_flow' => :'javaScriptSdkFlow'
27
31
  }
28
32
  end
29
33
 
@@ -38,7 +42,8 @@ module PCPServerSDK
38
42
  :'payment_product_id' => :'Integer',
39
43
  :'payment_product840_specific_output' => :'PaymentProduct840SpecificOutput',
40
44
  :'payment_processing_token' => :'String',
41
- :'reporting_token' => :'String'
45
+ :'reporting_token' => :'String',
46
+ :'java_script_sdk_flow' => :'Boolean'
42
47
  }
43
48
  end
44
49
 
@@ -78,6 +83,10 @@ module PCPServerSDK
78
83
  if attributes.key?(:'reporting_token')
79
84
  self.reporting_token = attributes[:'reporting_token']
80
85
  end
86
+
87
+ if attributes.key?(:'java_script_sdk_flow')
88
+ self.java_script_sdk_flow = attributes[:'java_script_sdk_flow']
89
+ end
81
90
  end
82
91
 
83
92
  # Checks equality by comparing each attribute.
@@ -88,7 +97,8 @@ module PCPServerSDK
88
97
  payment_product_id == o.payment_product_id &&
89
98
  payment_product840_specific_output == o.payment_product840_specific_output &&
90
99
  payment_processing_token == o.payment_processing_token &&
91
- reporting_token == o.reporting_token
100
+ reporting_token == o.reporting_token &&
101
+ java_script_sdk_flow == o.java_script_sdk_flow
92
102
  end
93
103
 
94
104
  # @see the `==` method
@@ -100,7 +110,7 @@ module PCPServerSDK
100
110
  # Calculates hash code according to all attributes.
101
111
  # @return [Integer] Hash code
102
112
  def hash
103
- [payment_product_id, payment_product840_specific_output, payment_processing_token, reporting_token].hash
113
+ [payment_product_id, payment_product840_specific_output, payment_processing_token, reporting_token, java_script_sdk_flow].hash
104
114
  end
105
115
 
106
116
  # Builds the object from hash
@@ -18,17 +18,12 @@ module PCPServerSDK
18
18
  # @return [Boolean]
19
19
  attr_accessor :java_script_sdk_flow
20
20
 
21
- # Required parameter for a COMPLETE CALL (not only an ORDER CALL) which one value "CONFIRM_ORDER_STATUS" signals process is finished on merchant side.
22
- # @return [String] Only value: "CONFIRM_ORDER_STATUS"
23
- attr_accessor :action
24
-
25
21
  # Attribute mapping from ruby-style variable name to JSON key.
26
22
  def self.attribute_map
27
23
  {
28
24
  :'address_selection_at_pay_pal' => :'addressSelectionAtPayPal',
29
25
  :'fraud_net_id' => :'fraudNetId',
30
- :'java_script_sdk_flow' => :'javaScriptSdkFlow',
31
- :'action' => :'action'
26
+ :'java_script_sdk_flow' => :'javaScriptSdkFlow'
32
27
  }
33
28
  end
34
29
 
@@ -42,8 +37,7 @@ module PCPServerSDK
42
37
  {
43
38
  :'address_selection_at_pay_pal' => :'Boolean',
44
39
  :'fraud_net_id' => :'String',
45
- :'java_script_sdk_flow' => :'Boolean',
46
- :'action' => :'String'
40
+ :'java_script_sdk_flow' => :'Boolean'
47
41
  }
48
42
  end
49
43
 
@@ -79,10 +73,6 @@ module PCPServerSDK
79
73
  if attributes.key?(:'java_script_sdk_flow')
80
74
  self.java_script_sdk_flow = attributes[:'java_script_sdk_flow']
81
75
  end
82
-
83
- if attributes.key?(:'action')
84
- self.action = attributes[:'action']
85
- end
86
76
  end
87
77
 
88
78
  # Checks equality by comparing each attribute.
@@ -92,8 +82,7 @@ module PCPServerSDK
92
82
  self.class == o.class &&
93
83
  address_selection_at_pay_pal == o.address_selection_at_pay_pal &&
94
84
  fraud_net_id == o.fraud_net_id &&
95
- java_script_sdk_flow == o.java_script_sdk_flow &&
96
- action == o.action
85
+ java_script_sdk_flow == o.java_script_sdk_flow
97
86
  end
98
87
 
99
88
  # @see the `==` method
@@ -105,7 +94,7 @@ module PCPServerSDK
105
94
  # Calculates hash code according to all attributes.
106
95
  # @return [Integer] Hash code
107
96
  def hash
108
- [address_selection_at_pay_pal, fraud_net_id, java_script_sdk_flow, action].hash
97
+ [address_selection_at_pay_pal, fraud_net_id, java_script_sdk_flow].hash
109
98
  end
110
99
 
111
100
  # Builds the object from hash
@@ -1,4 +1,4 @@
1
1
 
2
2
  module PCPServerSDK
3
- VERSION = '1.4.0'
3
+ VERSION = '1.5.0'
4
4
  end
@@ -127,6 +127,8 @@ require_relative 'PCP-server-Ruby-SDK/models/processing_mandate_information'
127
127
  require_relative 'PCP-server-Ruby-SDK/models/product_type'
128
128
  require_relative 'PCP-server-Ruby-SDK/models/redirect_data'
129
129
  require_relative 'PCP-server-Ruby-SDK/models/redirect_payment_method_specific_input'
130
+ require_relative 'PCP-server-Ruby-SDK/models/complete_payment_product840_specific_input'
131
+ require_relative 'PCP-server-Ruby-SDK/models/complete_redirect_payment_method_specific_input'
130
132
  require_relative 'PCP-server-Ruby-SDK/models/redirect_payment_method_specific_output'
131
133
  require_relative 'PCP-server-Ruby-SDK/models/redirect_payment_product840_specific_input'
132
134
  require_relative 'PCP-server-Ruby-SDK/models/redirection_data'