cybersource_rest_client 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client.rb +18 -44
  3. data/lib/cybersource_rest_client/api/asymmetric_key_management_api.rb +9 -9
  4. data/lib/cybersource_rest_client/api/symmetric_key_management_api.rb +9 -9
  5. data/lib/cybersource_rest_client/api/tokenization_api.rb +89 -0
  6. data/lib/cybersource_rest_client/models/{tokenize_result.rb → flex_v1_tokens_post200_response.rb} +1 -1
  7. data/lib/cybersource_rest_client/models/{card_info.rb → flexv1tokens_card_info.rb} +1 -1
  8. data/lib/cybersource_rest_client/models/{inline_response_200_3.rb → kms_v2_keys_asym_deletes_post200_response.rb} +2 -2
  9. data/lib/cybersource_rest_client/models/{inline_response_200_3_key_information.rb → kms_v2_keys_asym_deletes_post200_response_key_information.rb} +2 -2
  10. data/lib/cybersource_rest_client/models/{inline_response_200_2.rb → kms_v2_keys_asym_get200_response.rb} +2 -2
  11. data/lib/cybersource_rest_client/models/{inline_response_200_2_key_information.rb → kms_v2_keys_asym_get200_response_key_information.rb} +2 -2
  12. data/lib/cybersource_rest_client/models/{inline_response_201_1.rb → kms_v2_keys_asym_post201_response.rb} +3 -3
  13. data/lib/cybersource_rest_client/models/{inline_response_201_1_certificate_information.rb → kms_v2_keys_asym_post201_response_certificate_information.rb} +1 -1
  14. data/lib/cybersource_rest_client/models/{inline_response_201_1_key_information.rb → kms_v2_keys_asym_post201_response_key_information.rb} +2 -2
  15. data/lib/cybersource_rest_client/models/{inline_response_200_1.rb → kms_v2_keys_sym_deletes_post200_response.rb} +2 -2
  16. data/lib/cybersource_rest_client/models/{inline_response_200_1_key_information.rb → kms_v2_keys_sym_deletes_post200_response_key_information.rb} +2 -2
  17. data/lib/cybersource_rest_client/models/{inline_response_200.rb → kms_v2_keys_sym_get200_response.rb} +2 -2
  18. data/lib/cybersource_rest_client/models/{inline_response_200_key_information.rb → kms_v2_keys_sym_get200_response_key_information.rb} +2 -2
  19. data/lib/cybersource_rest_client/models/{inline_response_201.rb → kms_v2_keys_sym_post201_response.rb} +2 -2
  20. data/lib/cybersource_rest_client/models/{inline_response_201_error_information.rb → kms_v2_keys_sym_post201_response_error_information.rb} +1 -1
  21. data/lib/cybersource_rest_client/models/{inline_response_201_key_information.rb → kms_v2_keys_sym_post201_response_key_information.rb} +2 -2
  22. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +6 -6
  23. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +6 -6
  24. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +1 -1
  25. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +1 -1
  26. data/lib/cybersource_rest_client/models/{tokenize_parameters.rb → tokenize_request.rb} +2 -2
  27. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
  28. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb +1 -1
  29. metadata +20 -46
  30. data/lib/cybersource_rest_client/models/customer.rb +0 -292
  31. data/lib/cybersource_rest_client/models/der_public_key.rb +0 -205
  32. data/lib/cybersource_rest_client/models/error.rb +0 -192
  33. data/lib/cybersource_rest_client/models/error_bean.rb +0 -247
  34. data/lib/cybersource_rest_client/models/error_field_bean.rb +0 -205
  35. data/lib/cybersource_rest_client/models/error_links.rb +0 -205
  36. data/lib/cybersource_rest_client/models/error_response.rb +0 -192
  37. data/lib/cybersource_rest_client/models/file_bean.rb +0 -202
  38. data/lib/cybersource_rest_client/models/file_detail.rb +0 -244
  39. data/lib/cybersource_rest_client/models/file_details_response.rb +0 -194
  40. data/lib/cybersource_rest_client/models/instrument_identifier.rb +0 -286
  41. data/lib/cybersource_rest_client/models/json_web_key.rb +0 -225
  42. data/lib/cybersource_rest_client/models/key_parameters.rb +0 -199
  43. data/lib/cybersource_rest_client/models/key_result.rb +0 -202
  44. data/lib/cybersource_rest_client/models/link.rb +0 -204
  45. data/lib/cybersource_rest_client/models/links.rb +0 -205
  46. data/lib/cybersource_rest_client/models/payment_instrument.rb +0 -318
  47. data/lib/cybersource_rest_client/models/payment_instrument_paginated.rb +0 -232
  48. data/lib/cybersource_rest_client/models/response_status.rb +0 -225
  49. data/lib/cybersource_rest_client/models/response_status_details.rb +0 -194
  50. data/lib/cybersource_rest_client/models/self_link_bean.rb +0 -192
  51. data/lib/cybersource_rest_client/models/shipping_address.rb +0 -235
  52. data/lib/cybersource_rest_client/models/shipping_address_paginated.rb +0 -233
  53. data/lib/cybersource_rest_client/models/tms_error.rb +0 -205
  54. data/lib/cybersource_rest_client/models/tms_error_details.rb +0 -194
  55. data/lib/cybersource_rest_client/models/tms_error_response.rb +0 -185
  56. data/lib/cybersource_rest_client/models/tokenize_parameters_card_info.rb +0 -224
@@ -1,292 +0,0 @@
1
- =begin
2
- #CyberSource Merged Spec
3
-
4
- #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
-
6
- OpenAPI spec version: 0.0.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module CyberSource
16
- class Customer
17
- attr_accessor :_links
18
-
19
- # The id of the Customer Token.
20
- attr_accessor :id
21
-
22
- attr_accessor :object_information
23
-
24
- attr_accessor :buyer_information
25
-
26
- attr_accessor :client_reference_information
27
-
28
- # Object containing the custom data that the merchant defines.
29
- attr_accessor :merchant_defined_information
30
-
31
- attr_accessor :default_payment_instrument
32
-
33
- attr_accessor :default_shipping_address
34
-
35
- attr_accessor :metadata
36
-
37
- attr_accessor :_embedded
38
-
39
- # Attribute mapping from ruby-style variable name to JSON key.
40
- def self.attribute_map
41
- {
42
- :'_links' => :'_links',
43
- :'id' => :'id',
44
- :'object_information' => :'objectInformation',
45
- :'buyer_information' => :'buyerInformation',
46
- :'client_reference_information' => :'clientReferenceInformation',
47
- :'merchant_defined_information' => :'merchantDefinedInformation',
48
- :'default_payment_instrument' => :'defaultPaymentInstrument',
49
- :'default_shipping_address' => :'defaultShippingAddress',
50
- :'metadata' => :'metadata',
51
- :'_embedded' => :'_embedded'
52
- }
53
- end
54
-
55
- # Attribute type mapping.
56
- def self.swagger_types
57
- {
58
- :'_links' => :'Tmsv2customersLinks',
59
- :'id' => :'String',
60
- :'object_information' => :'Tmsv2customersObjectInformation',
61
- :'buyer_information' => :'Tmsv2customersBuyerInformation',
62
- :'client_reference_information' => :'Tmsv2customersClientReferenceInformation',
63
- :'merchant_defined_information' => :'Array<Tmsv2customersMerchantDefinedInformation>',
64
- :'default_payment_instrument' => :'Tmsv2customersDefaultPaymentInstrument',
65
- :'default_shipping_address' => :'Tmsv2customersDefaultShippingAddress',
66
- :'metadata' => :'Tmsv2customersMetadata',
67
- :'_embedded' => :'Tmsv2customersEmbedded'
68
- }
69
- end
70
-
71
- # Initializes the object
72
- # @param [Hash] attributes Model attributes in the form of hash
73
- def initialize(attributes = {})
74
- return unless attributes.is_a?(Hash)
75
-
76
- # convert string to symbol for hash key
77
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
78
-
79
- if attributes.has_key?(:'_links')
80
- self._links = attributes[:'_links']
81
- end
82
-
83
- if attributes.has_key?(:'id')
84
- self.id = attributes[:'id']
85
- end
86
-
87
- if attributes.has_key?(:'objectInformation')
88
- self.object_information = attributes[:'objectInformation']
89
- end
90
-
91
- if attributes.has_key?(:'buyerInformation')
92
- self.buyer_information = attributes[:'buyerInformation']
93
- end
94
-
95
- if attributes.has_key?(:'clientReferenceInformation')
96
- self.client_reference_information = attributes[:'clientReferenceInformation']
97
- end
98
-
99
- if attributes.has_key?(:'merchantDefinedInformation')
100
- if (value = attributes[:'merchantDefinedInformation']).is_a?(Array)
101
- self.merchant_defined_information = value
102
- end
103
- end
104
-
105
- if attributes.has_key?(:'defaultPaymentInstrument')
106
- self.default_payment_instrument = attributes[:'defaultPaymentInstrument']
107
- end
108
-
109
- if attributes.has_key?(:'defaultShippingAddress')
110
- self.default_shipping_address = attributes[:'defaultShippingAddress']
111
- end
112
-
113
- if attributes.has_key?(:'metadata')
114
- self.metadata = attributes[:'metadata']
115
- end
116
-
117
- if attributes.has_key?(:'_embedded')
118
- self._embedded = attributes[:'_embedded']
119
- end
120
- end
121
-
122
- # Show invalid properties with the reasons. Usually used together with valid?
123
- # @return Array for valid properties with the reasons
124
- def list_invalid_properties
125
- invalid_properties = Array.new
126
- if !@id.nil? && @id.to_s.length > 32
127
- invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 32.')
128
- end
129
-
130
- if !@id.nil? && @id.to_s.length < 1
131
- invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
132
- end
133
-
134
- invalid_properties
135
- end
136
-
137
- # Check to see if the all the properties in the model are valid
138
- # @return true if the model is valid
139
- def valid?
140
- return false if !@id.nil? && @id.to_s.length > 32
141
- return false if !@id.nil? && @id.to_s.length < 1
142
- true
143
- end
144
-
145
- # Custom attribute writer method with validation
146
- # @param [Object] id Value to be assigned
147
- def id=(id)
148
- if !id.nil? && id.to_s.length > 32
149
- fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 32.'
150
- end
151
-
152
- if !id.nil? && id.to_s.length < 1
153
- fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
154
- end
155
-
156
- @id = id
157
- end
158
-
159
- # Checks equality by comparing each attribute.
160
- # @param [Object] Object to be compared
161
- def ==(o)
162
- return true if self.equal?(o)
163
- self.class == o.class &&
164
- _links == o._links &&
165
- id == o.id &&
166
- object_information == o.object_information &&
167
- buyer_information == o.buyer_information &&
168
- client_reference_information == o.client_reference_information &&
169
- merchant_defined_information == o.merchant_defined_information &&
170
- default_payment_instrument == o.default_payment_instrument &&
171
- default_shipping_address == o.default_shipping_address &&
172
- metadata == o.metadata &&
173
- _embedded == o._embedded
174
- end
175
-
176
- # @see the `==` method
177
- # @param [Object] Object to be compared
178
- def eql?(o)
179
- self == o
180
- end
181
-
182
- # Calculates hash code according to all attributes.
183
- # @return [Fixnum] Hash code
184
- def hash
185
- [_links, id, object_information, buyer_information, client_reference_information, merchant_defined_information, default_payment_instrument, default_shipping_address, metadata, _embedded].hash
186
- end
187
-
188
- # Builds the object from hash
189
- # @param [Hash] attributes Model attributes in the form of hash
190
- # @return [Object] Returns the model itself
191
- def build_from_hash(attributes)
192
- return nil unless attributes.is_a?(Hash)
193
- self.class.swagger_types.each_pair do |key, type|
194
- if type =~ /\AArray<(.*)>/i
195
- # check to ensure the input is an array given that the the attribute
196
- # is documented as an array but the input is not
197
- if attributes[self.class.attribute_map[key]].is_a?(Array)
198
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
199
- end
200
- elsif !attributes[self.class.attribute_map[key]].nil?
201
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
202
- end # or else data not found in attributes(hash), not an issue as the data can be optional
203
- end
204
-
205
- self
206
- end
207
-
208
- # Deserializes the data based on type
209
- # @param string type Data type
210
- # @param string value Value to be deserialized
211
- # @return [Object] Deserialized data
212
- def _deserialize(type, value)
213
- case type.to_sym
214
- when :DateTime
215
- DateTime.parse(value)
216
- when :Date
217
- Date.parse(value)
218
- when :String
219
- value.to_s
220
- when :Integer
221
- value.to_i
222
- when :Float
223
- value.to_f
224
- when :BOOLEAN
225
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
226
- true
227
- else
228
- false
229
- end
230
- when :Object
231
- # generic object (usually a Hash), return directly
232
- value
233
- when /\AArray<(?<inner_type>.+)>\z/
234
- inner_type = Regexp.last_match[:inner_type]
235
- value.map { |v| _deserialize(inner_type, v) }
236
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
237
- k_type = Regexp.last_match[:k_type]
238
- v_type = Regexp.last_match[:v_type]
239
- {}.tap do |hash|
240
- value.each do |k, v|
241
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
242
- end
243
- end
244
- else # model
245
- temp_model = CyberSource.const_get(type).new
246
- temp_model.build_from_hash(value)
247
- end
248
- end
249
-
250
- # Returns the string representation of the object
251
- # @return [String] String presentation of the object
252
- def to_s
253
- to_hash.to_s
254
- end
255
-
256
- # to_body is an alias to to_hash (backward compatibility)
257
- # @return [Hash] Returns the object in the form of hash
258
- def to_body
259
- to_hash
260
- end
261
-
262
- # Returns the object in the form of hash
263
- # @return [Hash] Returns the object in the form of hash
264
- def to_hash
265
- hash = {}
266
- self.class.attribute_map.each_pair do |attr, param|
267
- value = self.send(attr)
268
- next if value.nil?
269
- hash[param] = _to_hash(value)
270
- end
271
- hash
272
- end
273
-
274
- # Outputs non-array value in the form of hash
275
- # For object, use to_hash. Otherwise, just return the value
276
- # @param [Object] value Any valid value
277
- # @return [Hash] Returns the value in the form of hash
278
- def _to_hash(value)
279
- if value.is_a?(Array)
280
- value.compact.map { |v| _to_hash(v) }
281
- elsif value.is_a?(Hash)
282
- {}.tap do |hash|
283
- value.each { |k, v| hash[k] = _to_hash(v) }
284
- end
285
- elsif value.respond_to? :to_hash
286
- value.to_hash
287
- else
288
- value
289
- end
290
- end
291
- end
292
- end
@@ -1,205 +0,0 @@
1
- =begin
2
- #CyberSource Merged Spec
3
-
4
- #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
-
6
- OpenAPI spec version: 0.0.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module CyberSource
16
- # The public key in DER format. Used to validate the response from the Tokenize Card request. Additionally this format is useful for client side encryption in Android and iOS implementations.
17
- class DerPublicKey
18
- # Specifies the format of the public key; currently X.509.
19
- attr_accessor :format
20
-
21
- # Algorithm used to encrypt the public key.
22
- attr_accessor :algorithm
23
-
24
- # Base64 encoded public key value.
25
- attr_accessor :public_key
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'format' => :'format',
31
- :'algorithm' => :'algorithm',
32
- :'public_key' => :'publicKey'
33
- }
34
- end
35
-
36
- # Attribute type mapping.
37
- def self.swagger_types
38
- {
39
- :'format' => :'String',
40
- :'algorithm' => :'String',
41
- :'public_key' => :'String'
42
- }
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- return unless attributes.is_a?(Hash)
49
-
50
- # convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
-
53
- if attributes.has_key?(:'format')
54
- self.format = attributes[:'format']
55
- end
56
-
57
- if attributes.has_key?(:'algorithm')
58
- self.algorithm = attributes[:'algorithm']
59
- end
60
-
61
- if attributes.has_key?(:'publicKey')
62
- self.public_key = attributes[:'publicKey']
63
- end
64
- end
65
-
66
- # Show invalid properties with the reasons. Usually used together with valid?
67
- # @return Array for valid properties with the reasons
68
- def list_invalid_properties
69
- invalid_properties = Array.new
70
- invalid_properties
71
- end
72
-
73
- # Check to see if the all the properties in the model are valid
74
- # @return true if the model is valid
75
- def valid?
76
- true
77
- end
78
-
79
- # Checks equality by comparing each attribute.
80
- # @param [Object] Object to be compared
81
- def ==(o)
82
- return true if self.equal?(o)
83
- self.class == o.class &&
84
- format == o.format &&
85
- algorithm == o.algorithm &&
86
- public_key == o.public_key
87
- end
88
-
89
- # @see the `==` method
90
- # @param [Object] Object to be compared
91
- def eql?(o)
92
- self == o
93
- end
94
-
95
- # Calculates hash code according to all attributes.
96
- # @return [Fixnum] Hash code
97
- def hash
98
- [format, algorithm, public_key].hash
99
- end
100
-
101
- # Builds the object from hash
102
- # @param [Hash] attributes Model attributes in the form of hash
103
- # @return [Object] Returns the model itself
104
- def build_from_hash(attributes)
105
- return nil unless attributes.is_a?(Hash)
106
- self.class.swagger_types.each_pair do |key, type|
107
- if type =~ /\AArray<(.*)>/i
108
- # check to ensure the input is an array given that the the attribute
109
- # is documented as an array but the input is not
110
- if attributes[self.class.attribute_map[key]].is_a?(Array)
111
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
- end
113
- elsif !attributes[self.class.attribute_map[key]].nil?
114
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
- end # or else data not found in attributes(hash), not an issue as the data can be optional
116
- end
117
-
118
- self
119
- end
120
-
121
- # Deserializes the data based on type
122
- # @param string type Data type
123
- # @param string value Value to be deserialized
124
- # @return [Object] Deserialized data
125
- def _deserialize(type, value)
126
- case type.to_sym
127
- when :DateTime
128
- DateTime.parse(value)
129
- when :Date
130
- Date.parse(value)
131
- when :String
132
- value.to_s
133
- when :Integer
134
- value.to_i
135
- when :Float
136
- value.to_f
137
- when :BOOLEAN
138
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
- true
140
- else
141
- false
142
- end
143
- when :Object
144
- # generic object (usually a Hash), return directly
145
- value
146
- when /\AArray<(?<inner_type>.+)>\z/
147
- inner_type = Regexp.last_match[:inner_type]
148
- value.map { |v| _deserialize(inner_type, v) }
149
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
- k_type = Regexp.last_match[:k_type]
151
- v_type = Regexp.last_match[:v_type]
152
- {}.tap do |hash|
153
- value.each do |k, v|
154
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
- end
156
- end
157
- else # model
158
- temp_model = CyberSource.const_get(type).new
159
- temp_model.build_from_hash(value)
160
- end
161
- end
162
-
163
- # Returns the string representation of the object
164
- # @return [String] String presentation of the object
165
- def to_s
166
- to_hash.to_s
167
- end
168
-
169
- # to_body is an alias to to_hash (backward compatibility)
170
- # @return [Hash] Returns the object in the form of hash
171
- def to_body
172
- to_hash
173
- end
174
-
175
- # Returns the object in the form of hash
176
- # @return [Hash] Returns the object in the form of hash
177
- def to_hash
178
- hash = {}
179
- self.class.attribute_map.each_pair do |attr, param|
180
- value = self.send(attr)
181
- next if value.nil?
182
- hash[param] = _to_hash(value)
183
- end
184
- hash
185
- end
186
-
187
- # Outputs non-array value in the form of hash
188
- # For object, use to_hash. Otherwise, just return the value
189
- # @param [Object] value Any valid value
190
- # @return [Hash] Returns the value in the form of hash
191
- def _to_hash(value)
192
- if value.is_a?(Array)
193
- value.compact.map { |v| _to_hash(v) }
194
- elsif value.is_a?(Hash)
195
- {}.tap do |hash|
196
- value.each { |k, v| hash[k] = _to_hash(v) }
197
- end
198
- elsif value.respond_to? :to_hash
199
- value.to_hash
200
- else
201
- value
202
- end
203
- end
204
- end
205
- end