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,232 +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 PaymentInstrumentPaginated
17
- attr_accessor :_links
18
-
19
- # The offset parameter supplied in the request.
20
- attr_accessor :offset
21
-
22
- # The limit parameter supplied in the request.
23
- attr_accessor :limit
24
-
25
- # The number of Payment Instruments returned in the array.
26
- attr_accessor :count
27
-
28
- # The total number of Payment Instruments associated with the Customer or Instrument Identifier.
29
- attr_accessor :total
30
-
31
- attr_accessor :_embedded
32
-
33
- # Attribute mapping from ruby-style variable name to JSON key.
34
- def self.attribute_map
35
- {
36
- :'_links' => :'_links',
37
- :'offset' => :'offset',
38
- :'limit' => :'limit',
39
- :'count' => :'count',
40
- :'total' => :'total',
41
- :'_embedded' => :'_embedded'
42
- }
43
- end
44
-
45
- # Attribute type mapping.
46
- def self.swagger_types
47
- {
48
- :'_links' => :'PaymentInstrumentListForCustomerLinks',
49
- :'offset' => :'Integer',
50
- :'limit' => :'Integer',
51
- :'count' => :'Integer',
52
- :'total' => :'Integer',
53
- :'_embedded' => :'PaymentInstrumentListForCustomerEmbedded'
54
- }
55
- end
56
-
57
- # Initializes the object
58
- # @param [Hash] attributes Model attributes in the form of hash
59
- def initialize(attributes = {})
60
- return unless attributes.is_a?(Hash)
61
-
62
- # convert string to symbol for hash key
63
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
64
-
65
- if attributes.has_key?(:'_links')
66
- self._links = attributes[:'_links']
67
- end
68
-
69
- if attributes.has_key?(:'offset')
70
- self.offset = attributes[:'offset']
71
- end
72
-
73
- if attributes.has_key?(:'limit')
74
- self.limit = attributes[:'limit']
75
- end
76
-
77
- if attributes.has_key?(:'count')
78
- self.count = attributes[:'count']
79
- end
80
-
81
- if attributes.has_key?(:'total')
82
- self.total = attributes[:'total']
83
- end
84
-
85
- if attributes.has_key?(:'_embedded')
86
- self._embedded = attributes[:'_embedded']
87
- end
88
- end
89
-
90
- # Show invalid properties with the reasons. Usually used together with valid?
91
- # @return Array for valid properties with the reasons
92
- def list_invalid_properties
93
- invalid_properties = Array.new
94
- invalid_properties
95
- end
96
-
97
- # Check to see if the all the properties in the model are valid
98
- # @return true if the model is valid
99
- def valid?
100
- true
101
- end
102
-
103
- # Checks equality by comparing each attribute.
104
- # @param [Object] Object to be compared
105
- def ==(o)
106
- return true if self.equal?(o)
107
- self.class == o.class &&
108
- _links == o._links &&
109
- offset == o.offset &&
110
- limit == o.limit &&
111
- count == o.count &&
112
- total == o.total &&
113
- _embedded == o._embedded
114
- end
115
-
116
- # @see the `==` method
117
- # @param [Object] Object to be compared
118
- def eql?(o)
119
- self == o
120
- end
121
-
122
- # Calculates hash code according to all attributes.
123
- # @return [Fixnum] Hash code
124
- def hash
125
- [_links, offset, limit, count, total, _embedded].hash
126
- end
127
-
128
- # Builds the object from hash
129
- # @param [Hash] attributes Model attributes in the form of hash
130
- # @return [Object] Returns the model itself
131
- def build_from_hash(attributes)
132
- return nil unless attributes.is_a?(Hash)
133
- self.class.swagger_types.each_pair do |key, type|
134
- if type =~ /\AArray<(.*)>/i
135
- # check to ensure the input is an array given that the the attribute
136
- # is documented as an array but the input is not
137
- if attributes[self.class.attribute_map[key]].is_a?(Array)
138
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
139
- end
140
- elsif !attributes[self.class.attribute_map[key]].nil?
141
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
- end # or else data not found in attributes(hash), not an issue as the data can be optional
143
- end
144
-
145
- self
146
- end
147
-
148
- # Deserializes the data based on type
149
- # @param string type Data type
150
- # @param string value Value to be deserialized
151
- # @return [Object] Deserialized data
152
- def _deserialize(type, value)
153
- case type.to_sym
154
- when :DateTime
155
- DateTime.parse(value)
156
- when :Date
157
- Date.parse(value)
158
- when :String
159
- value.to_s
160
- when :Integer
161
- value.to_i
162
- when :Float
163
- value.to_f
164
- when :BOOLEAN
165
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
- true
167
- else
168
- false
169
- end
170
- when :Object
171
- # generic object (usually a Hash), return directly
172
- value
173
- when /\AArray<(?<inner_type>.+)>\z/
174
- inner_type = Regexp.last_match[:inner_type]
175
- value.map { |v| _deserialize(inner_type, v) }
176
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
- k_type = Regexp.last_match[:k_type]
178
- v_type = Regexp.last_match[:v_type]
179
- {}.tap do |hash|
180
- value.each do |k, v|
181
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
- end
183
- end
184
- else # model
185
- temp_model = CyberSource.const_get(type).new
186
- temp_model.build_from_hash(value)
187
- end
188
- end
189
-
190
- # Returns the string representation of the object
191
- # @return [String] String presentation of the object
192
- def to_s
193
- to_hash.to_s
194
- end
195
-
196
- # to_body is an alias to to_hash (backward compatibility)
197
- # @return [Hash] Returns the object in the form of hash
198
- def to_body
199
- to_hash
200
- end
201
-
202
- # Returns the object in the form of hash
203
- # @return [Hash] Returns the object in the form of hash
204
- def to_hash
205
- hash = {}
206
- self.class.attribute_map.each_pair do |attr, param|
207
- value = self.send(attr)
208
- next if value.nil?
209
- hash[param] = _to_hash(value)
210
- end
211
- hash
212
- end
213
-
214
- # Outputs non-array value in the form of hash
215
- # For object, use to_hash. Otherwise, just return the value
216
- # @param [Object] value Any valid value
217
- # @return [Hash] Returns the value in the form of hash
218
- def _to_hash(value)
219
- if value.is_a?(Array)
220
- value.compact.map { |v| _to_hash(v) }
221
- elsif value.is_a?(Hash)
222
- {}.tap do |hash|
223
- value.each { |k, v| hash[k] = _to_hash(v) }
224
- end
225
- elsif value.respond_to? :to_hash
226
- value.to_hash
227
- else
228
- value
229
- end
230
- end
231
- end
232
- end
@@ -1,225 +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 ResponseStatus
17
- # HTTP Status code.
18
- attr_accessor :status
19
-
20
- # Error Reason Code.
21
- attr_accessor :reason
22
-
23
- # Error Message.
24
- attr_accessor :message
25
-
26
- # API correlation ID.
27
- attr_accessor :correlation_id
28
-
29
- attr_accessor :details
30
-
31
- # Attribute mapping from ruby-style variable name to JSON key.
32
- def self.attribute_map
33
- {
34
- :'status' => :'status',
35
- :'reason' => :'reason',
36
- :'message' => :'message',
37
- :'correlation_id' => :'correlationId',
38
- :'details' => :'details'
39
- }
40
- end
41
-
42
- # Attribute type mapping.
43
- def self.swagger_types
44
- {
45
- :'status' => :'Float',
46
- :'reason' => :'String',
47
- :'message' => :'String',
48
- :'correlation_id' => :'String',
49
- :'details' => :'Array<InlineResponseDefaultResponseStatusDetails>'
50
- }
51
- end
52
-
53
- # Initializes the object
54
- # @param [Hash] attributes Model attributes in the form of hash
55
- def initialize(attributes = {})
56
- return unless attributes.is_a?(Hash)
57
-
58
- # convert string to symbol for hash key
59
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
60
-
61
- if attributes.has_key?(:'status')
62
- self.status = attributes[:'status']
63
- end
64
-
65
- if attributes.has_key?(:'reason')
66
- self.reason = attributes[:'reason']
67
- end
68
-
69
- if attributes.has_key?(:'message')
70
- self.message = attributes[:'message']
71
- end
72
-
73
- if attributes.has_key?(:'correlationId')
74
- self.correlation_id = attributes[:'correlationId']
75
- end
76
-
77
- if attributes.has_key?(:'details')
78
- if (value = attributes[:'details']).is_a?(Array)
79
- self.details = value
80
- end
81
- end
82
- end
83
-
84
- # Show invalid properties with the reasons. Usually used together with valid?
85
- # @return Array for valid properties with the reasons
86
- def list_invalid_properties
87
- invalid_properties = Array.new
88
- invalid_properties
89
- end
90
-
91
- # Check to see if the all the properties in the model are valid
92
- # @return true if the model is valid
93
- def valid?
94
- true
95
- end
96
-
97
- # Checks equality by comparing each attribute.
98
- # @param [Object] Object to be compared
99
- def ==(o)
100
- return true if self.equal?(o)
101
- self.class == o.class &&
102
- status == o.status &&
103
- reason == o.reason &&
104
- message == o.message &&
105
- correlation_id == o.correlation_id &&
106
- details == o.details
107
- end
108
-
109
- # @see the `==` method
110
- # @param [Object] Object to be compared
111
- def eql?(o)
112
- self == o
113
- end
114
-
115
- # Calculates hash code according to all attributes.
116
- # @return [Fixnum] Hash code
117
- def hash
118
- [status, reason, message, correlation_id, details].hash
119
- end
120
-
121
- # Builds the object from hash
122
- # @param [Hash] attributes Model attributes in the form of hash
123
- # @return [Object] Returns the model itself
124
- def build_from_hash(attributes)
125
- return nil unless attributes.is_a?(Hash)
126
- self.class.swagger_types.each_pair do |key, type|
127
- if type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the the attribute
129
- # is documented as an array but the input is not
130
- if attributes[self.class.attribute_map[key]].is_a?(Array)
131
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
- end
133
- elsif !attributes[self.class.attribute_map[key]].nil?
134
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
- end # or else data not found in attributes(hash), not an issue as the data can be optional
136
- end
137
-
138
- self
139
- end
140
-
141
- # Deserializes the data based on type
142
- # @param string type Data type
143
- # @param string value Value to be deserialized
144
- # @return [Object] Deserialized data
145
- def _deserialize(type, value)
146
- case type.to_sym
147
- when :DateTime
148
- DateTime.parse(value)
149
- when :Date
150
- Date.parse(value)
151
- when :String
152
- value.to_s
153
- when :Integer
154
- value.to_i
155
- when :Float
156
- value.to_f
157
- when :BOOLEAN
158
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
- true
160
- else
161
- false
162
- end
163
- when :Object
164
- # generic object (usually a Hash), return directly
165
- value
166
- when /\AArray<(?<inner_type>.+)>\z/
167
- inner_type = Regexp.last_match[:inner_type]
168
- value.map { |v| _deserialize(inner_type, v) }
169
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
- k_type = Regexp.last_match[:k_type]
171
- v_type = Regexp.last_match[:v_type]
172
- {}.tap do |hash|
173
- value.each do |k, v|
174
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
- end
176
- end
177
- else # model
178
- temp_model = CyberSource.const_get(type).new
179
- temp_model.build_from_hash(value)
180
- end
181
- end
182
-
183
- # Returns the string representation of the object
184
- # @return [String] String presentation of the object
185
- def to_s
186
- to_hash.to_s
187
- end
188
-
189
- # to_body is an alias to to_hash (backward compatibility)
190
- # @return [Hash] Returns the object in the form of hash
191
- def to_body
192
- to_hash
193
- end
194
-
195
- # Returns the object in the form of hash
196
- # @return [Hash] Returns the object in the form of hash
197
- def to_hash
198
- hash = {}
199
- self.class.attribute_map.each_pair do |attr, param|
200
- value = self.send(attr)
201
- next if value.nil?
202
- hash[param] = _to_hash(value)
203
- end
204
- hash
205
- end
206
-
207
- # Outputs non-array value in the form of hash
208
- # For object, use to_hash. Otherwise, just return the value
209
- # @param [Object] value Any valid value
210
- # @return [Hash] Returns the value in the form of hash
211
- def _to_hash(value)
212
- if value.is_a?(Array)
213
- value.compact.map { |v| _to_hash(v) }
214
- elsif value.is_a?(Hash)
215
- {}.tap do |hash|
216
- value.each { |k, v| hash[k] = _to_hash(v) }
217
- end
218
- elsif value.respond_to? :to_hash
219
- value.to_hash
220
- else
221
- value
222
- end
223
- end
224
- end
225
- end