cybersource_rest_client 0.0.46 → 0.0.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cybersource_rest_client/api/emv_tag_details_api.rb +152 -0
- data/lib/cybersource_rest_client/api/transient_token_data_api.rb +92 -0
- data/lib/cybersource_rest_client/api/unified_checkout_capture_context_api.rb +88 -0
- data/lib/cybersource_rest_client/models/body.rb +216 -0
- data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +276 -0
- data/lib/cybersource_rest_client/models/inline_response_400_3.rb +265 -0
- data/lib/cybersource_rest_client/models/inline_response_400_3_details.rb +192 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_issuer_information.rb +52 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_issuer_information.rb +4 -20
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response.rb +13 -4
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_issuer_information.rb +190 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_recurring_payment_information.rb +100 -4
- data/lib/cybersource_rest_client/models/tss_v2_get_emv_tags200_response.rb +186 -0
- data/lib/cybersource_rest_client/models/tss_v2_get_emv_tags200_response_emv_tag_breakdown_list.rb +215 -0
- data/lib/cybersource_rest_client/models/tss_v2_post_emv_tags200_response.rb +186 -0
- data/lib/cybersource_rest_client/models/tss_v2_post_emv_tags200_response_emv_tag_breakdown_list.rb +266 -0
- data/lib/cybersource_rest_client/models/tss_v2_post_emv_tags200_response_parsed_emv_tags_list.rb +212 -0
- data/lib/cybersource_rest_client/models/tssv2transactionsemv_tag_details_emv_details_list.rb +224 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_capture_mandate.rb +242 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_checkout_api_initialization.rb +264 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information.rb +201 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_amount_details.rb +192 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_bill_to.rb +459 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_bill_to_company.rb +350 -0
- data/lib/cybersource_rest_client/models/upv1capturecontexts_order_information_ship_to.rb +354 -0
- data/lib/cybersource_rest_client.rb +21 -0
- metadata +45 -24
@@ -0,0 +1,459 @@
|
|
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 Upv1capturecontextsOrderInformationBillTo
|
17
|
+
# Payment card billing street address as it appears on the credit card issuer’s records.
|
18
|
+
attr_accessor :address1
|
19
|
+
|
20
|
+
# Used for additional address information. For example: _Attention: Accounts Payable_ Optional field.
|
21
|
+
attr_accessor :address2
|
22
|
+
|
23
|
+
# Additional address information (third line of the billing address)
|
24
|
+
attr_accessor :address3
|
25
|
+
|
26
|
+
# Additional address information (fourth line of the billing address)
|
27
|
+
attr_accessor :address4
|
28
|
+
|
29
|
+
# State or province of the billing address. Use the [State, Province, and Territory Codes for the United States and Canada](https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf).
|
30
|
+
attr_accessor :administrative_area
|
31
|
+
|
32
|
+
# Building number in the street address.
|
33
|
+
attr_accessor :building_number
|
34
|
+
|
35
|
+
# Payment card billing country. Use the two-character [ISO Standard Country Codes](http://apps.cybersource.com/library/documentation/sbc/quickref/countries_alpha_list.pdf).
|
36
|
+
attr_accessor :country
|
37
|
+
|
38
|
+
# Customer’s neighborhood, community, or region (a barrio in Brazil) within the city or municipality
|
39
|
+
attr_accessor :district
|
40
|
+
|
41
|
+
# Payment card billing city.
|
42
|
+
attr_accessor :locality
|
43
|
+
|
44
|
+
# Postal code for the billing address. The postal code must consist of 5 to 9 digits.
|
45
|
+
attr_accessor :postal_code
|
46
|
+
|
47
|
+
attr_accessor :company
|
48
|
+
|
49
|
+
# Customer's email address, including the full domain name.
|
50
|
+
attr_accessor :email
|
51
|
+
|
52
|
+
# Customer’s first name. This name must be the same as the name on the card
|
53
|
+
attr_accessor :first_name
|
54
|
+
|
55
|
+
# Customer’s last name. This name must be the same as the name on the card.
|
56
|
+
attr_accessor :last_name
|
57
|
+
|
58
|
+
# Customer’s middle name.
|
59
|
+
attr_accessor :middle_name
|
60
|
+
|
61
|
+
# Customer’s name suffix.
|
62
|
+
attr_accessor :name_suffix
|
63
|
+
|
64
|
+
# Title.
|
65
|
+
attr_accessor :title
|
66
|
+
|
67
|
+
# Customer’s phone number.
|
68
|
+
attr_accessor :phone_number
|
69
|
+
|
70
|
+
# Customer's phone number type. #### For Payouts: This field may be sent only for FDC Compass. Possible Values: * day * home * night * work
|
71
|
+
attr_accessor :phone_type
|
72
|
+
|
73
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
74
|
+
def self.attribute_map
|
75
|
+
{
|
76
|
+
:'address1' => :'address1',
|
77
|
+
:'address2' => :'address2',
|
78
|
+
:'address3' => :'address3',
|
79
|
+
:'address4' => :'address4',
|
80
|
+
:'administrative_area' => :'administrativeArea',
|
81
|
+
:'building_number' => :'buildingNumber',
|
82
|
+
:'country' => :'country',
|
83
|
+
:'district' => :'district',
|
84
|
+
:'locality' => :'locality',
|
85
|
+
:'postal_code' => :'postalCode',
|
86
|
+
:'company' => :'company',
|
87
|
+
:'email' => :'email',
|
88
|
+
:'first_name' => :'firstName',
|
89
|
+
:'last_name' => :'lastName',
|
90
|
+
:'middle_name' => :'middleName',
|
91
|
+
:'name_suffix' => :'nameSuffix',
|
92
|
+
:'title' => :'title',
|
93
|
+
:'phone_number' => :'phoneNumber',
|
94
|
+
:'phone_type' => :'phoneType'
|
95
|
+
}
|
96
|
+
end
|
97
|
+
|
98
|
+
# Attribute type mapping.
|
99
|
+
def self.swagger_types
|
100
|
+
{
|
101
|
+
:'address1' => :'String',
|
102
|
+
:'address2' => :'String',
|
103
|
+
:'address3' => :'String',
|
104
|
+
:'address4' => :'String',
|
105
|
+
:'administrative_area' => :'String',
|
106
|
+
:'building_number' => :'String',
|
107
|
+
:'country' => :'String',
|
108
|
+
:'district' => :'String',
|
109
|
+
:'locality' => :'String',
|
110
|
+
:'postal_code' => :'String',
|
111
|
+
:'company' => :'Upv1capturecontextsOrderInformationBillToCompany',
|
112
|
+
:'email' => :'String',
|
113
|
+
:'first_name' => :'String',
|
114
|
+
:'last_name' => :'String',
|
115
|
+
:'middle_name' => :'String',
|
116
|
+
:'name_suffix' => :'String',
|
117
|
+
:'title' => :'String',
|
118
|
+
:'phone_number' => :'String',
|
119
|
+
:'phone_type' => :'String'
|
120
|
+
}
|
121
|
+
end
|
122
|
+
|
123
|
+
# Initializes the object
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
def initialize(attributes = {})
|
126
|
+
return unless attributes.is_a?(Hash)
|
127
|
+
|
128
|
+
# convert string to symbol for hash key
|
129
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
130
|
+
|
131
|
+
if attributes.has_key?(:'address1')
|
132
|
+
self.address1 = attributes[:'address1']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.has_key?(:'address2')
|
136
|
+
self.address2 = attributes[:'address2']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'address3')
|
140
|
+
self.address3 = attributes[:'address3']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.has_key?(:'address4')
|
144
|
+
self.address4 = attributes[:'address4']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'administrativeArea')
|
148
|
+
self.administrative_area = attributes[:'administrativeArea']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'buildingNumber')
|
152
|
+
self.building_number = attributes[:'buildingNumber']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'country')
|
156
|
+
self.country = attributes[:'country']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'district')
|
160
|
+
self.district = attributes[:'district']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'locality')
|
164
|
+
self.locality = attributes[:'locality']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'postalCode')
|
168
|
+
self.postal_code = attributes[:'postalCode']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'company')
|
172
|
+
self.company = attributes[:'company']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'email')
|
176
|
+
self.email = attributes[:'email']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'firstName')
|
180
|
+
self.first_name = attributes[:'firstName']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'lastName')
|
184
|
+
self.last_name = attributes[:'lastName']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'middleName')
|
188
|
+
self.middle_name = attributes[:'middleName']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'nameSuffix')
|
192
|
+
self.name_suffix = attributes[:'nameSuffix']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.has_key?(:'title')
|
196
|
+
self.title = attributes[:'title']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.has_key?(:'phoneNumber')
|
200
|
+
self.phone_number = attributes[:'phoneNumber']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.has_key?(:'phoneType')
|
204
|
+
self.phone_type = attributes[:'phoneType']
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
209
|
+
# @return Array for valid properties with the reasons
|
210
|
+
def list_invalid_properties
|
211
|
+
invalid_properties = Array.new
|
212
|
+
invalid_properties
|
213
|
+
end
|
214
|
+
|
215
|
+
# Check to see if the all the properties in the model are valid
|
216
|
+
# @return true if the model is valid
|
217
|
+
def valid?
|
218
|
+
true
|
219
|
+
end
|
220
|
+
|
221
|
+
# Custom attribute writer method with validation
|
222
|
+
# @param [Object] address1 Value to be assigned
|
223
|
+
def address1=(address1)
|
224
|
+
@address1 = address1
|
225
|
+
end
|
226
|
+
|
227
|
+
# Custom attribute writer method with validation
|
228
|
+
# @param [Object] address2 Value to be assigned
|
229
|
+
def address2=(address2)
|
230
|
+
@address2 = address2
|
231
|
+
end
|
232
|
+
|
233
|
+
# Custom attribute writer method with validation
|
234
|
+
# @param [Object] address3 Value to be assigned
|
235
|
+
def address3=(address3)
|
236
|
+
@address3 = address3
|
237
|
+
end
|
238
|
+
|
239
|
+
# Custom attribute writer method with validation
|
240
|
+
# @param [Object] address4 Value to be assigned
|
241
|
+
def address4=(address4)
|
242
|
+
@address4 = address4
|
243
|
+
end
|
244
|
+
|
245
|
+
# Custom attribute writer method with validation
|
246
|
+
# @param [Object] administrative_area Value to be assigned
|
247
|
+
def administrative_area=(administrative_area)
|
248
|
+
@administrative_area = administrative_area
|
249
|
+
end
|
250
|
+
|
251
|
+
# Custom attribute writer method with validation
|
252
|
+
# @param [Object] building_number Value to be assigned
|
253
|
+
def building_number=(building_number)
|
254
|
+
@building_number = building_number
|
255
|
+
end
|
256
|
+
|
257
|
+
# Custom attribute writer method with validation
|
258
|
+
# @param [Object] country Value to be assigned
|
259
|
+
def country=(country)
|
260
|
+
@country = country
|
261
|
+
end
|
262
|
+
|
263
|
+
# Custom attribute writer method with validation
|
264
|
+
# @param [Object] district Value to be assigned
|
265
|
+
def district=(district)
|
266
|
+
@district = district
|
267
|
+
end
|
268
|
+
|
269
|
+
# Custom attribute writer method with validation
|
270
|
+
# @param [Object] locality Value to be assigned
|
271
|
+
def locality=(locality)
|
272
|
+
@locality = locality
|
273
|
+
end
|
274
|
+
|
275
|
+
# Custom attribute writer method with validation
|
276
|
+
# @param [Object] postal_code Value to be assigned
|
277
|
+
def postal_code=(postal_code)
|
278
|
+
@postal_code = postal_code
|
279
|
+
end
|
280
|
+
|
281
|
+
# Custom attribute writer method with validation
|
282
|
+
# @param [Object] email Value to be assigned
|
283
|
+
def email=(email)
|
284
|
+
@email = email
|
285
|
+
end
|
286
|
+
|
287
|
+
# Custom attribute writer method with validation
|
288
|
+
# @param [Object] first_name Value to be assigned
|
289
|
+
def first_name=(first_name)
|
290
|
+
@first_name = first_name
|
291
|
+
end
|
292
|
+
|
293
|
+
# Custom attribute writer method with validation
|
294
|
+
# @param [Object] last_name Value to be assigned
|
295
|
+
def last_name=(last_name)
|
296
|
+
@last_name = last_name
|
297
|
+
end
|
298
|
+
|
299
|
+
# Custom attribute writer method with validation
|
300
|
+
# @param [Object] middle_name Value to be assigned
|
301
|
+
def middle_name=(middle_name)
|
302
|
+
@middle_name = middle_name
|
303
|
+
end
|
304
|
+
|
305
|
+
# Custom attribute writer method with validation
|
306
|
+
# @param [Object] name_suffix Value to be assigned
|
307
|
+
def name_suffix=(name_suffix)
|
308
|
+
@name_suffix = name_suffix
|
309
|
+
end
|
310
|
+
|
311
|
+
# Custom attribute writer method with validation
|
312
|
+
# @param [Object] title Value to be assigned
|
313
|
+
def title=(title)
|
314
|
+
@title = title
|
315
|
+
end
|
316
|
+
|
317
|
+
# Checks equality by comparing each attribute.
|
318
|
+
# @param [Object] Object to be compared
|
319
|
+
def ==(o)
|
320
|
+
return true if self.equal?(o)
|
321
|
+
self.class == o.class &&
|
322
|
+
address1 == o.address1 &&
|
323
|
+
address2 == o.address2 &&
|
324
|
+
address3 == o.address3 &&
|
325
|
+
address4 == o.address4 &&
|
326
|
+
administrative_area == o.administrative_area &&
|
327
|
+
building_number == o.building_number &&
|
328
|
+
country == o.country &&
|
329
|
+
district == o.district &&
|
330
|
+
locality == o.locality &&
|
331
|
+
postal_code == o.postal_code &&
|
332
|
+
company == o.company &&
|
333
|
+
email == o.email &&
|
334
|
+
first_name == o.first_name &&
|
335
|
+
last_name == o.last_name &&
|
336
|
+
middle_name == o.middle_name &&
|
337
|
+
name_suffix == o.name_suffix &&
|
338
|
+
title == o.title &&
|
339
|
+
phone_number == o.phone_number &&
|
340
|
+
phone_type == o.phone_type
|
341
|
+
end
|
342
|
+
|
343
|
+
# @see the `==` method
|
344
|
+
# @param [Object] Object to be compared
|
345
|
+
def eql?(o)
|
346
|
+
self == o
|
347
|
+
end
|
348
|
+
|
349
|
+
# Calculates hash code according to all attributes.
|
350
|
+
# @return [Fixnum] Hash code
|
351
|
+
def hash
|
352
|
+
[address1, address2, address3, address4, administrative_area, building_number, country, district, locality, postal_code, company, email, first_name, last_name, middle_name, name_suffix, title, phone_number, phone_type].hash
|
353
|
+
end
|
354
|
+
|
355
|
+
# Builds the object from hash
|
356
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
357
|
+
# @return [Object] Returns the model itself
|
358
|
+
def build_from_hash(attributes)
|
359
|
+
return nil unless attributes.is_a?(Hash)
|
360
|
+
self.class.swagger_types.each_pair do |key, type|
|
361
|
+
if type =~ /\AArray<(.*)>/i
|
362
|
+
# check to ensure the input is an array given that the the attribute
|
363
|
+
# is documented as an array but the input is not
|
364
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
365
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
366
|
+
end
|
367
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
368
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
369
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
370
|
+
end
|
371
|
+
|
372
|
+
self
|
373
|
+
end
|
374
|
+
|
375
|
+
# Deserializes the data based on type
|
376
|
+
# @param string type Data type
|
377
|
+
# @param string value Value to be deserialized
|
378
|
+
# @return [Object] Deserialized data
|
379
|
+
def _deserialize(type, value)
|
380
|
+
case type.to_sym
|
381
|
+
when :DateTime
|
382
|
+
DateTime.parse(value)
|
383
|
+
when :Date
|
384
|
+
Date.parse(value)
|
385
|
+
when :String
|
386
|
+
value.to_s
|
387
|
+
when :Integer
|
388
|
+
value.to_i
|
389
|
+
when :Float
|
390
|
+
value.to_f
|
391
|
+
when :BOOLEAN
|
392
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
393
|
+
true
|
394
|
+
else
|
395
|
+
false
|
396
|
+
end
|
397
|
+
when :Object
|
398
|
+
# generic object (usually a Hash), return directly
|
399
|
+
value
|
400
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
401
|
+
inner_type = Regexp.last_match[:inner_type]
|
402
|
+
value.map { |v| _deserialize(inner_type, v) }
|
403
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
404
|
+
k_type = Regexp.last_match[:k_type]
|
405
|
+
v_type = Regexp.last_match[:v_type]
|
406
|
+
{}.tap do |hash|
|
407
|
+
value.each do |k, v|
|
408
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
409
|
+
end
|
410
|
+
end
|
411
|
+
else # model
|
412
|
+
temp_model = CyberSource.const_get(type).new
|
413
|
+
temp_model.build_from_hash(value)
|
414
|
+
end
|
415
|
+
end
|
416
|
+
|
417
|
+
# Returns the string representation of the object
|
418
|
+
# @return [String] String presentation of the object
|
419
|
+
def to_s
|
420
|
+
to_hash.to_s
|
421
|
+
end
|
422
|
+
|
423
|
+
# to_body is an alias to to_hash (backward compatibility)
|
424
|
+
# @return [Hash] Returns the object in the form of hash
|
425
|
+
def to_body
|
426
|
+
to_hash
|
427
|
+
end
|
428
|
+
|
429
|
+
# Returns the object in the form of hash
|
430
|
+
# @return [Hash] Returns the object in the form of hash
|
431
|
+
def to_hash
|
432
|
+
hash = {}
|
433
|
+
self.class.attribute_map.each_pair do |attr, param|
|
434
|
+
value = self.send(attr)
|
435
|
+
next if value.nil?
|
436
|
+
hash[param] = _to_hash(value)
|
437
|
+
end
|
438
|
+
hash
|
439
|
+
end
|
440
|
+
|
441
|
+
# Outputs non-array value in the form of hash
|
442
|
+
# For object, use to_hash. Otherwise, just return the value
|
443
|
+
# @param [Object] value Any valid value
|
444
|
+
# @return [Hash] Returns the value in the form of hash
|
445
|
+
def _to_hash(value)
|
446
|
+
if value.is_a?(Array)
|
447
|
+
value.compact.map { |v| _to_hash(v) }
|
448
|
+
elsif value.is_a?(Hash)
|
449
|
+
{}.tap do |hash|
|
450
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
451
|
+
end
|
452
|
+
elsif value.respond_to? :to_hash
|
453
|
+
value.to_hash
|
454
|
+
else
|
455
|
+
value
|
456
|
+
end
|
457
|
+
end
|
458
|
+
end
|
459
|
+
end
|