postfinancecheckout-ruby-sdk 7.0.0 → 8.0.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/Gemfile.lock +16 -16
- data/README.md +15 -1
- data/lib/postfinancecheckout-ruby-sdk/api_client.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk/models/charge_attempt_projection.rb +13 -4
- data/lib/postfinancecheckout-ruby-sdk/models/fulfillment_state.rb +2 -1
- data/lib/postfinancecheckout-ruby-sdk/models/merchant_application_submit_request_dto.rb +232 -0
- data/lib/postfinancecheckout-ruby-sdk/models/merchant_application_submitted_dto.rb +273 -0
- data/lib/postfinancecheckout-ruby-sdk/models/{payment_terminal_update.rb → payment_terminal_update_request.rb} +15 -41
- data/lib/postfinancecheckout-ruby-sdk/models/subscription_partial_update_request.rb +250 -0
- data/lib/postfinancecheckout-ruby-sdk/models/subscription_update_request.rb +45 -22
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_amounts.rb +257 -0
- data/lib/postfinancecheckout-ruby-sdk/models/walleejoin_create_partnership_api_request_dto.rb +20 -1
- data/lib/postfinancecheckout-ruby-sdk/service/merchant_applications_service.rb +151 -0
- data/lib/postfinancecheckout-ruby-sdk/service/payment_terminals_service.rb +9 -9
- data/lib/postfinancecheckout-ruby-sdk/service/subscriptions_service.rb +9 -9
- data/lib/postfinancecheckout-ruby-sdk/version.rb +1 -1
- data/lib/postfinancecheckout-ruby-sdk.rb +5 -1
- data/postfinancecheckout-ruby-sdk.gemspec +3 -3
- metadata +887 -866
|
@@ -25,13 +25,25 @@ require 'time'
|
|
|
25
25
|
|
|
26
26
|
module PostfinancecheckoutRubySdk
|
|
27
27
|
class SubscriptionUpdateRequest
|
|
28
|
-
#
|
|
29
|
-
attr_accessor :
|
|
28
|
+
# The configurations of the subscription's components.
|
|
29
|
+
attr_accessor :component_configurations
|
|
30
|
+
|
|
31
|
+
# The product to subscribe to.
|
|
32
|
+
attr_accessor :product
|
|
33
|
+
|
|
34
|
+
# The three-letter code (ISO 4217 format) of the currency used to invoice the customer. Must be one of the currencies supported by the product.
|
|
35
|
+
attr_accessor :currency
|
|
36
|
+
|
|
37
|
+
# Whether the subscriptions' termination periods should be respected.
|
|
38
|
+
attr_accessor :respect_termination_period
|
|
30
39
|
|
|
31
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
41
|
def self.attribute_map
|
|
33
42
|
{
|
|
34
|
-
:'
|
|
43
|
+
:'component_configurations' => :'componentConfigurations',
|
|
44
|
+
:'product' => :'product',
|
|
45
|
+
:'currency' => :'currency',
|
|
46
|
+
:'respect_termination_period' => :'respectTerminationPeriod'
|
|
35
47
|
}
|
|
36
48
|
end
|
|
37
49
|
|
|
@@ -48,7 +60,10 @@ module PostfinancecheckoutRubySdk
|
|
|
48
60
|
# Attribute type mapping.
|
|
49
61
|
def self.openapi_types
|
|
50
62
|
{
|
|
51
|
-
:'
|
|
63
|
+
:'component_configurations' => :'Array<SubscriptionComponentReferenceConfiguration>',
|
|
64
|
+
:'product' => :'Integer',
|
|
65
|
+
:'currency' => :'String',
|
|
66
|
+
:'respect_termination_period' => :'Boolean'
|
|
52
67
|
}
|
|
53
68
|
end
|
|
54
69
|
|
|
@@ -74,8 +89,22 @@ module PostfinancecheckoutRubySdk
|
|
|
74
89
|
h[k.to_sym] = v
|
|
75
90
|
}
|
|
76
91
|
|
|
77
|
-
if attributes.key?(:'
|
|
78
|
-
|
|
92
|
+
if attributes.key?(:'component_configurations')
|
|
93
|
+
if (value = attributes[:'component_configurations']).is_a?(Array)
|
|
94
|
+
self.component_configurations = value
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'product')
|
|
99
|
+
self.product = attributes[:'product']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'currency')
|
|
103
|
+
self.currency = attributes[:'currency']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'respect_termination_period')
|
|
107
|
+
self.respect_termination_period = attributes[:'respect_termination_period']
|
|
79
108
|
end
|
|
80
109
|
end
|
|
81
110
|
|
|
@@ -84,10 +113,6 @@ module PostfinancecheckoutRubySdk
|
|
|
84
113
|
def list_invalid_properties
|
|
85
114
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
115
|
invalid_properties = Array.new
|
|
87
|
-
if !@description.nil? && @description.to_s.length > 200
|
|
88
|
-
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 200.')
|
|
89
|
-
end
|
|
90
|
-
|
|
91
116
|
invalid_properties
|
|
92
117
|
end
|
|
93
118
|
|
|
@@ -95,22 +120,17 @@ module PostfinancecheckoutRubySdk
|
|
|
95
120
|
# @return true if the model is valid
|
|
96
121
|
def valid?
|
|
97
122
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
98
|
-
return false if !@description.nil? && @description.to_s.length > 200
|
|
99
123
|
true
|
|
100
124
|
end
|
|
101
125
|
|
|
102
126
|
# Custom attribute writer method with validation
|
|
103
|
-
# @param [Object]
|
|
104
|
-
def
|
|
105
|
-
if
|
|
106
|
-
fail ArgumentError, '
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
if description.to_s.length > 200
|
|
110
|
-
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 200.'
|
|
127
|
+
# @param [Object] component_configurations Value to be assigned
|
|
128
|
+
def component_configurations=(component_configurations)
|
|
129
|
+
if component_configurations.nil?
|
|
130
|
+
fail ArgumentError, 'component_configurations cannot be nil'
|
|
111
131
|
end
|
|
112
132
|
|
|
113
|
-
@
|
|
133
|
+
@component_configurations = component_configurations
|
|
114
134
|
end
|
|
115
135
|
|
|
116
136
|
# Checks equality by comparing each attribute.
|
|
@@ -118,7 +138,10 @@ module PostfinancecheckoutRubySdk
|
|
|
118
138
|
def ==(o)
|
|
119
139
|
return true if self.equal?(o)
|
|
120
140
|
self.class == o.class &&
|
|
121
|
-
|
|
141
|
+
component_configurations == o.component_configurations &&
|
|
142
|
+
product == o.product &&
|
|
143
|
+
currency == o.currency &&
|
|
144
|
+
respect_termination_period == o.respect_termination_period
|
|
122
145
|
end
|
|
123
146
|
|
|
124
147
|
# @see the `==` method
|
|
@@ -130,7 +153,7 @@ module PostfinancecheckoutRubySdk
|
|
|
130
153
|
# Calculates hash code according to all attributes.
|
|
131
154
|
# @return [Integer] Hash code
|
|
132
155
|
def hash
|
|
133
|
-
[
|
|
156
|
+
[component_configurations, product, currency, respect_termination_period].hash
|
|
134
157
|
end
|
|
135
158
|
|
|
136
159
|
# Builds the object from hash
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
# PostFinance Ruby SDK
|
|
3
|
+
#
|
|
4
|
+
# This library allows to interact with the PostFinance payment service.
|
|
5
|
+
#
|
|
6
|
+
# Copyright owner: Wallee AG
|
|
7
|
+
# Website: https://www.postfinance.ch/en/private.html
|
|
8
|
+
# Developer email: ecosystem-team@wallee.com
|
|
9
|
+
#
|
|
10
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
# you may not use this file except in compliance with the License.
|
|
12
|
+
# You may obtain a copy of the License at
|
|
13
|
+
#
|
|
14
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
#
|
|
16
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
# See the License for the specific language governing permissions and
|
|
20
|
+
# limitations under the License.
|
|
21
|
+
=end
|
|
22
|
+
|
|
23
|
+
require 'date'
|
|
24
|
+
require 'time'
|
|
25
|
+
|
|
26
|
+
module PostfinancecheckoutRubySdk
|
|
27
|
+
class TransactionAmounts
|
|
28
|
+
attr_accessor :completed_amount
|
|
29
|
+
|
|
30
|
+
attr_accessor :authorization_amount
|
|
31
|
+
|
|
32
|
+
attr_accessor :currency
|
|
33
|
+
|
|
34
|
+
attr_accessor :refunded_amount
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'completed_amount' => :'completedAmount',
|
|
40
|
+
:'authorization_amount' => :'authorizationAmount',
|
|
41
|
+
:'currency' => :'currency',
|
|
42
|
+
:'refunded_amount' => :'refundedAmount'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns attribute mapping this model knows about
|
|
47
|
+
def self.acceptable_attribute_map
|
|
48
|
+
attribute_map
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
|
52
|
+
def self.acceptable_attributes
|
|
53
|
+
acceptable_attribute_map.values
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
def self.openapi_types
|
|
58
|
+
{
|
|
59
|
+
:'completed_amount' => :'Float',
|
|
60
|
+
:'authorization_amount' => :'Float',
|
|
61
|
+
:'currency' => :'String',
|
|
62
|
+
:'refunded_amount' => :'Float'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PostfinancecheckoutRubySdk::TransactionAmounts` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PostfinancecheckoutRubySdk::TransactionAmounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'completed_amount')
|
|
89
|
+
self.completed_amount = attributes[:'completed_amount']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'authorization_amount')
|
|
93
|
+
self.authorization_amount = attributes[:'authorization_amount']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'currency')
|
|
97
|
+
self.currency = attributes[:'currency']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'refunded_amount')
|
|
101
|
+
self.refunded_amount = attributes[:'refunded_amount']
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
invalid_properties
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Check to see if the all the properties in the model are valid
|
|
114
|
+
# @return true if the model is valid
|
|
115
|
+
def valid?
|
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Checks equality by comparing each attribute.
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
completed_amount == o.completed_amount &&
|
|
126
|
+
authorization_amount == o.authorization_amount &&
|
|
127
|
+
currency == o.currency &&
|
|
128
|
+
refunded_amount == o.refunded_amount
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @see the `==` method
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def eql?(o)
|
|
134
|
+
self == o
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Integer] Hash code
|
|
139
|
+
def hash
|
|
140
|
+
[completed_amount, authorization_amount, currency, refunded_amount].hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def self.build_from_hash(attributes)
|
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
149
|
+
transformed_hash = {}
|
|
150
|
+
openapi_types.each_pair do |key, type|
|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = nil
|
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
154
|
+
# check to ensure the input is an array given that the attribute
|
|
155
|
+
# is documented as an array but the input is not
|
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
158
|
+
end
|
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
new(transformed_hash)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Deserializes the data based on type
|
|
167
|
+
# @param string type Data type
|
|
168
|
+
# @param string value Value to be deserialized
|
|
169
|
+
# @return [Object] Deserialized data
|
|
170
|
+
def self._deserialize(type, value)
|
|
171
|
+
case type.to_sym
|
|
172
|
+
when :Time
|
|
173
|
+
Time.parse(value)
|
|
174
|
+
when :Date
|
|
175
|
+
Date.parse(value)
|
|
176
|
+
when :String
|
|
177
|
+
value.to_s
|
|
178
|
+
when :Integer
|
|
179
|
+
value.to_i
|
|
180
|
+
when :Float
|
|
181
|
+
value.to_f
|
|
182
|
+
when :Boolean
|
|
183
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
184
|
+
true
|
|
185
|
+
else
|
|
186
|
+
false
|
|
187
|
+
end
|
|
188
|
+
when :Object
|
|
189
|
+
# generic object (usually a Hash), return directly
|
|
190
|
+
value
|
|
191
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
192
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
193
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
194
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
195
|
+
k_type = Regexp.last_match[:k_type]
|
|
196
|
+
v_type = Regexp.last_match[:v_type]
|
|
197
|
+
{}.tap do |hash|
|
|
198
|
+
value.each do |k, v|
|
|
199
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
else # model
|
|
203
|
+
# models (e.g. Pet) or oneOf
|
|
204
|
+
klass = PostfinancecheckoutRubySdk.const_get(type)
|
|
205
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Returns the string representation of the object
|
|
210
|
+
# @return [String] String presentation of the object
|
|
211
|
+
def to_s
|
|
212
|
+
to_hash.to_s
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
|
217
|
+
def to_body
|
|
218
|
+
to_hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the object in the form of hash
|
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
|
223
|
+
def to_hash
|
|
224
|
+
hash = {}
|
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
226
|
+
value = self.send(attr)
|
|
227
|
+
if value.nil?
|
|
228
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Outputs non-array value in the form of hash
|
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
+
# @param [Object] value Any valid value
|
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
|
241
|
+
def _to_hash(value)
|
|
242
|
+
if value.is_a?(Array)
|
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
|
244
|
+
elsif value.is_a?(Hash)
|
|
245
|
+
{}.tap do |hash|
|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
247
|
+
end
|
|
248
|
+
elsif value.respond_to? :to_hash
|
|
249
|
+
value.to_hash
|
|
250
|
+
else
|
|
251
|
+
value
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
end
|
data/lib/postfinancecheckout-ruby-sdk/models/walleejoin_create_partnership_api_request_dto.rb
CHANGED
|
@@ -29,6 +29,11 @@ module PostfinancecheckoutRubySdk
|
|
|
29
29
|
|
|
30
30
|
attr_accessor :partner_account_id
|
|
31
31
|
|
|
32
|
+
# The name of the subaccount created for the merchant. Only used for ISV partnerships when a merchant email address is provided. If empty, a generated name is used.
|
|
33
|
+
attr_accessor :merchant_account_name
|
|
34
|
+
|
|
35
|
+
attr_accessor :merchant_address
|
|
36
|
+
|
|
32
37
|
attr_accessor :pricing_profile_sell_rate_id
|
|
33
38
|
|
|
34
39
|
attr_accessor :subscription_product_id
|
|
@@ -40,6 +45,8 @@ module PostfinancecheckoutRubySdk
|
|
|
40
45
|
{
|
|
41
46
|
:'email_message' => :'emailMessage',
|
|
42
47
|
:'partner_account_id' => :'partnerAccountId',
|
|
48
|
+
:'merchant_account_name' => :'merchantAccountName',
|
|
49
|
+
:'merchant_address' => :'merchantAddress',
|
|
43
50
|
:'pricing_profile_sell_rate_id' => :'pricingProfileSellRateId',
|
|
44
51
|
:'subscription_product_id' => :'subscriptionProductId',
|
|
45
52
|
:'merchant_email_address' => :'merchantEmailAddress'
|
|
@@ -61,6 +68,8 @@ module PostfinancecheckoutRubySdk
|
|
|
61
68
|
{
|
|
62
69
|
:'email_message' => :'String',
|
|
63
70
|
:'partner_account_id' => :'Integer',
|
|
71
|
+
:'merchant_account_name' => :'String',
|
|
72
|
+
:'merchant_address' => :'SpaceAddressCreate',
|
|
64
73
|
:'pricing_profile_sell_rate_id' => :'Integer',
|
|
65
74
|
:'subscription_product_id' => :'Integer',
|
|
66
75
|
:'merchant_email_address' => :'String'
|
|
@@ -97,6 +106,14 @@ module PostfinancecheckoutRubySdk
|
|
|
97
106
|
self.partner_account_id = attributes[:'partner_account_id']
|
|
98
107
|
end
|
|
99
108
|
|
|
109
|
+
if attributes.key?(:'merchant_account_name')
|
|
110
|
+
self.merchant_account_name = attributes[:'merchant_account_name']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'merchant_address')
|
|
114
|
+
self.merchant_address = attributes[:'merchant_address']
|
|
115
|
+
end
|
|
116
|
+
|
|
100
117
|
if attributes.key?(:'pricing_profile_sell_rate_id')
|
|
101
118
|
self.pricing_profile_sell_rate_id = attributes[:'pricing_profile_sell_rate_id']
|
|
102
119
|
end
|
|
@@ -132,6 +149,8 @@ module PostfinancecheckoutRubySdk
|
|
|
132
149
|
self.class == o.class &&
|
|
133
150
|
email_message == o.email_message &&
|
|
134
151
|
partner_account_id == o.partner_account_id &&
|
|
152
|
+
merchant_account_name == o.merchant_account_name &&
|
|
153
|
+
merchant_address == o.merchant_address &&
|
|
135
154
|
pricing_profile_sell_rate_id == o.pricing_profile_sell_rate_id &&
|
|
136
155
|
subscription_product_id == o.subscription_product_id &&
|
|
137
156
|
merchant_email_address == o.merchant_email_address
|
|
@@ -146,7 +165,7 @@ module PostfinancecheckoutRubySdk
|
|
|
146
165
|
# Calculates hash code according to all attributes.
|
|
147
166
|
# @return [Integer] Hash code
|
|
148
167
|
def hash
|
|
149
|
-
[email_message, partner_account_id, pricing_profile_sell_rate_id, subscription_product_id, merchant_email_address].hash
|
|
168
|
+
[email_message, partner_account_id, merchant_account_name, merchant_address, pricing_profile_sell_rate_id, subscription_product_id, merchant_email_address].hash
|
|
150
169
|
end
|
|
151
170
|
|
|
152
171
|
# Builds the object from hash
|
|
@@ -30,6 +30,74 @@ module PostfinancecheckoutRubySdk
|
|
|
30
30
|
def initialize(api_client = ApiClient.default)
|
|
31
31
|
@api_client = api_client
|
|
32
32
|
end
|
|
33
|
+
# Retrieve a merchant application by account
|
|
34
|
+
# Returns the merchant application for the account specified in the account header.
|
|
35
|
+
# @param account [Integer] Specifies the ID of the account the operation should be executed in.
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [Array<String>] :expand
|
|
38
|
+
# @return [MerchantApplicationDataDto]
|
|
39
|
+
def get_onboarding_merchant_applications_by_account(account, opts = {})
|
|
40
|
+
data, _status_code, _headers = get_onboarding_merchant_applications_by_account_with_http_info(account, opts)
|
|
41
|
+
data
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Retrieve a merchant application by account
|
|
45
|
+
# Returns the merchant application for the account specified in the account header.
|
|
46
|
+
|
|
47
|
+
# @param account [Integer] Specifies the ID of the account the operation should be executed in.
|
|
48
|
+
# @param [Hash] opts the optional parameters
|
|
49
|
+
# @option opts [Array<String>] :expand
|
|
50
|
+
# @return [Array<(MerchantApplicationDataDto, Integer, Hash)>] MerchantApplicationDataDto data, response status code and response headers
|
|
51
|
+
def get_onboarding_merchant_applications_by_account_with_http_info(account, opts = {})
|
|
52
|
+
if @api_client.config.debugging
|
|
53
|
+
@api_client.config.logger.debug 'Calling API: MerchantApplicationsService.get_onboarding_merchant_applications_by_account ...'
|
|
54
|
+
end
|
|
55
|
+
# verify the required parameter 'account' is set
|
|
56
|
+
if @api_client.config.client_side_validation && account.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'account' when calling MerchantApplicationsService.get_onboarding_merchant_applications_by_account"
|
|
58
|
+
end
|
|
59
|
+
# resource path
|
|
60
|
+
local_var_path = '/onboarding/merchant-applications/by-account'
|
|
61
|
+
|
|
62
|
+
# query parameters
|
|
63
|
+
query_params = opts[:query_params] || {}
|
|
64
|
+
query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?
|
|
65
|
+
|
|
66
|
+
# header parameters
|
|
67
|
+
header_params = opts[:header_params] || {}
|
|
68
|
+
# HTTP header 'Accept' (if needed)
|
|
69
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
70
|
+
header_params[:'account'] = account
|
|
71
|
+
|
|
72
|
+
# form parameters
|
|
73
|
+
form_params = opts[:form_params] || {}
|
|
74
|
+
|
|
75
|
+
# connection timeout
|
|
76
|
+
connection_timeout = @api_client.config.timeout
|
|
77
|
+
|
|
78
|
+
# http body (model)
|
|
79
|
+
post_body = opts[:debug_body]
|
|
80
|
+
|
|
81
|
+
# return_type
|
|
82
|
+
return_type = opts[:debug_return_type] || 'MerchantApplicationDataDto'
|
|
83
|
+
|
|
84
|
+
new_options = opts.merge(
|
|
85
|
+
:operation => :"MerchantApplicationsService.get_onboarding_merchant_applications_by_account",
|
|
86
|
+
:header_params => header_params,
|
|
87
|
+
:query_params => query_params,
|
|
88
|
+
:form_params => form_params,
|
|
89
|
+
:body => post_body,
|
|
90
|
+
:return_type => return_type
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, new_options, connection_timeout)
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug "API called: MerchantApplicationsService#get_onboarding_merchant_applications_by_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
|
|
96
|
+
end
|
|
97
|
+
return data, status_code, headers
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
|
|
33
101
|
# Retrieve a merchant application status
|
|
34
102
|
# @param id [Integer]
|
|
35
103
|
# @param account [Integer] Specifies the ID of the account the operation should be executed in.
|
|
@@ -330,5 +398,88 @@ module PostfinancecheckoutRubySdk
|
|
|
330
398
|
return data, status_code, headers
|
|
331
399
|
end
|
|
332
400
|
|
|
401
|
+
|
|
402
|
+
# Submit a merchant application and create an organization
|
|
403
|
+
# @param id [Integer]
|
|
404
|
+
# @param account [Integer] Specifies the ID of the account the operation should be executed in.
|
|
405
|
+
# @param merchant_application_submit_request_dto [MerchantApplicationSubmitRequestDto]
|
|
406
|
+
# @param [Hash] opts the optional parameters
|
|
407
|
+
# @option opts [Array<String>] :expand
|
|
408
|
+
# @return [MerchantApplicationSubmittedDto]
|
|
409
|
+
def post_onboarding_merchant_applications_id_submit(id, account, merchant_application_submit_request_dto, opts = {})
|
|
410
|
+
data, _status_code, _headers = post_onboarding_merchant_applications_id_submit_with_http_info(id, account, merchant_application_submit_request_dto, opts)
|
|
411
|
+
data
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Submit a merchant application and create an organization
|
|
415
|
+
|
|
416
|
+
# @param id [Integer]
|
|
417
|
+
# @param account [Integer] Specifies the ID of the account the operation should be executed in.
|
|
418
|
+
# @param merchant_application_submit_request_dto [MerchantApplicationSubmitRequestDto]
|
|
419
|
+
# @param [Hash] opts the optional parameters
|
|
420
|
+
# @option opts [Array<String>] :expand
|
|
421
|
+
# @return [Array<(MerchantApplicationSubmittedDto, Integer, Hash)>] MerchantApplicationSubmittedDto data, response status code and response headers
|
|
422
|
+
def post_onboarding_merchant_applications_id_submit_with_http_info(id, account, merchant_application_submit_request_dto, opts = {})
|
|
423
|
+
if @api_client.config.debugging
|
|
424
|
+
@api_client.config.logger.debug 'Calling API: MerchantApplicationsService.post_onboarding_merchant_applications_id_submit ...'
|
|
425
|
+
end
|
|
426
|
+
# verify the required parameter 'id' is set
|
|
427
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
428
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling MerchantApplicationsService.post_onboarding_merchant_applications_id_submit"
|
|
429
|
+
end
|
|
430
|
+
# verify the required parameter 'account' is set
|
|
431
|
+
if @api_client.config.client_side_validation && account.nil?
|
|
432
|
+
fail ArgumentError, "Missing the required parameter 'account' when calling MerchantApplicationsService.post_onboarding_merchant_applications_id_submit"
|
|
433
|
+
end
|
|
434
|
+
# verify the required parameter 'merchant_application_submit_request_dto' is set
|
|
435
|
+
if @api_client.config.client_side_validation && merchant_application_submit_request_dto.nil?
|
|
436
|
+
fail ArgumentError, "Missing the required parameter 'merchant_application_submit_request_dto' when calling MerchantApplicationsService.post_onboarding_merchant_applications_id_submit"
|
|
437
|
+
end
|
|
438
|
+
# resource path
|
|
439
|
+
local_var_path = '/onboarding/merchant-applications/{id}/submit'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
440
|
+
|
|
441
|
+
# query parameters
|
|
442
|
+
query_params = opts[:query_params] || {}
|
|
443
|
+
query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil?
|
|
444
|
+
|
|
445
|
+
# header parameters
|
|
446
|
+
header_params = opts[:header_params] || {}
|
|
447
|
+
# HTTP header 'Accept' (if needed)
|
|
448
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
449
|
+
# HTTP header 'Content-Type'
|
|
450
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
451
|
+
if !content_type.nil?
|
|
452
|
+
header_params['Content-Type'] = content_type
|
|
453
|
+
end
|
|
454
|
+
header_params[:'account'] = account
|
|
455
|
+
|
|
456
|
+
# form parameters
|
|
457
|
+
form_params = opts[:form_params] || {}
|
|
458
|
+
|
|
459
|
+
# connection timeout
|
|
460
|
+
connection_timeout = @api_client.config.timeout
|
|
461
|
+
|
|
462
|
+
# http body (model)
|
|
463
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(merchant_application_submit_request_dto)
|
|
464
|
+
|
|
465
|
+
# return_type
|
|
466
|
+
return_type = opts[:debug_return_type] || 'MerchantApplicationSubmittedDto'
|
|
467
|
+
|
|
468
|
+
new_options = opts.merge(
|
|
469
|
+
:operation => :"MerchantApplicationsService.post_onboarding_merchant_applications_id_submit",
|
|
470
|
+
:header_params => header_params,
|
|
471
|
+
:query_params => query_params,
|
|
472
|
+
:form_params => form_params,
|
|
473
|
+
:body => post_body,
|
|
474
|
+
:return_type => return_type
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, new_options, connection_timeout)
|
|
478
|
+
if @api_client.config.debugging
|
|
479
|
+
@api_client.config.logger.debug "API called: MerchantApplicationsService#post_onboarding_merchant_applications_id_submit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}"
|
|
480
|
+
end
|
|
481
|
+
return data, status_code, headers
|
|
482
|
+
end
|
|
483
|
+
|
|
333
484
|
end
|
|
334
485
|
end
|
|
@@ -535,12 +535,12 @@ module PostfinancecheckoutRubySdk
|
|
|
535
535
|
# Update a payment terminal
|
|
536
536
|
# @param id [Integer]
|
|
537
537
|
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
538
|
-
# @param
|
|
538
|
+
# @param payment_terminal_update_request [PaymentTerminalUpdateRequest]
|
|
539
539
|
# @param [Hash] opts the optional parameters
|
|
540
540
|
# @option opts [Array<String>] :expand
|
|
541
541
|
# @return [PaymentTerminal]
|
|
542
|
-
def patch_payment_terminals_id(id, space,
|
|
543
|
-
data, _status_code, _headers = patch_payment_terminals_id_with_http_info(id, space,
|
|
542
|
+
def patch_payment_terminals_id(id, space, payment_terminal_update_request, opts = {})
|
|
543
|
+
data, _status_code, _headers = patch_payment_terminals_id_with_http_info(id, space, payment_terminal_update_request, opts)
|
|
544
544
|
data
|
|
545
545
|
end
|
|
546
546
|
|
|
@@ -548,11 +548,11 @@ module PostfinancecheckoutRubySdk
|
|
|
548
548
|
|
|
549
549
|
# @param id [Integer]
|
|
550
550
|
# @param space [Integer] Specifies the ID of the space the operation should be executed in.
|
|
551
|
-
# @param
|
|
551
|
+
# @param payment_terminal_update_request [PaymentTerminalUpdateRequest]
|
|
552
552
|
# @param [Hash] opts the optional parameters
|
|
553
553
|
# @option opts [Array<String>] :expand
|
|
554
554
|
# @return [Array<(PaymentTerminal, Integer, Hash)>] PaymentTerminal data, response status code and response headers
|
|
555
|
-
def patch_payment_terminals_id_with_http_info(id, space,
|
|
555
|
+
def patch_payment_terminals_id_with_http_info(id, space, payment_terminal_update_request, opts = {})
|
|
556
556
|
if @api_client.config.debugging
|
|
557
557
|
@api_client.config.logger.debug 'Calling API: PaymentTerminalsService.patch_payment_terminals_id ...'
|
|
558
558
|
end
|
|
@@ -564,9 +564,9 @@ module PostfinancecheckoutRubySdk
|
|
|
564
564
|
if @api_client.config.client_side_validation && space.nil?
|
|
565
565
|
fail ArgumentError, "Missing the required parameter 'space' when calling PaymentTerminalsService.patch_payment_terminals_id"
|
|
566
566
|
end
|
|
567
|
-
# verify the required parameter '
|
|
568
|
-
if @api_client.config.client_side_validation &&
|
|
569
|
-
fail ArgumentError, "Missing the required parameter '
|
|
567
|
+
# verify the required parameter 'payment_terminal_update_request' is set
|
|
568
|
+
if @api_client.config.client_side_validation && payment_terminal_update_request.nil?
|
|
569
|
+
fail ArgumentError, "Missing the required parameter 'payment_terminal_update_request' when calling PaymentTerminalsService.patch_payment_terminals_id"
|
|
570
570
|
end
|
|
571
571
|
# resource path
|
|
572
572
|
local_var_path = '/payment/terminals/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
@@ -593,7 +593,7 @@ module PostfinancecheckoutRubySdk
|
|
|
593
593
|
connection_timeout = @api_client.config.timeout
|
|
594
594
|
|
|
595
595
|
# http body (model)
|
|
596
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
596
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_terminal_update_request)
|
|
597
597
|
|
|
598
598
|
# return_type
|
|
599
599
|
return_type = opts[:debug_return_type] || 'PaymentTerminal'
|