cybersource_rest_client 0.0.40 → 0.0.44

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.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/logging/sensitive_logging.rb +7 -4
  3. data/lib/cybersource_rest_client/api/asymmetric_key_management_api.rb +223 -219
  4. data/lib/cybersource_rest_client/api/chargeback_details_api.rb +116 -112
  5. data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +116 -112
  6. data/lib/cybersource_rest_client/api/conversion_details_api.rb +5 -1
  7. data/lib/cybersource_rest_client/api/customer_api.rb +368 -360
  8. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +530 -518
  9. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +530 -518
  10. data/lib/cybersource_rest_client/api/download_dtd_api.rb +92 -88
  11. data/lib/cybersource_rest_client/api/download_xsd_api.rb +92 -88
  12. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +15 -3
  13. data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +116 -112
  14. data/lib/cybersource_rest_client/api/invoice_settings_api.rb +152 -148
  15. data/lib/cybersource_rest_client/api/invoices_api.rb +447 -431
  16. data/lib/cybersource_rest_client/api/net_fundings_api.rb +5 -1
  17. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +5 -1
  18. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +219 -219
  19. data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +133 -129
  20. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +10 -2
  21. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +5 -1
  22. data/lib/cybersource_rest_client/api/report_definitions_api.rb +10 -2
  23. data/lib/cybersource_rest_client/api/report_downloads_api.rb +5 -1
  24. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +15 -3
  25. data/lib/cybersource_rest_client/api/reports_api.rb +10 -2
  26. data/lib/cybersource_rest_client/api/retrieval_details_api.rb +116 -112
  27. data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +116 -112
  28. data/lib/cybersource_rest_client/api/search_transactions_api.rb +5 -1
  29. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +206 -198
  30. data/lib/cybersource_rest_client/api/symmetric_key_management_api.rb +5 -1
  31. data/lib/cybersource_rest_client/api/taxes_api.rb +160 -160
  32. data/lib/cybersource_rest_client/api/tokenization_api.rb +89 -89
  33. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +15 -3
  34. data/lib/cybersource_rest_client/api/transaction_details_api.rb +5 -1
  35. data/lib/cybersource_rest_client/api/user_management_api.rb +5 -1
  36. data/lib/cybersource_rest_client/api/user_management_search_api.rb +89 -89
  37. data/lib/cybersource_rest_client/api/verification_api.rb +154 -154
  38. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +10 -1
  39. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +1 -1
  40. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_issuer_information.rb +20 -4
  41. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +20 -4
  42. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_insights_information.rb +183 -0
  43. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_insights_information_response_insights.rb +206 -0
  44. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb +20 -4
  45. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +2 -2
  46. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +20 -4
  47. data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +11 -1
  48. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +20 -4
  49. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +20 -4
  50. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +22 -6
  51. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +20 -4
  52. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb +15 -7
  53. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +14 -4
  54. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +17 -1
  55. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb +2 -2
  56. data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +13 -4
  57. data/lib/cybersource_rest_client/models/ptsv2payments_processor_information_authorization_options.rb +190 -0
  58. data/lib/cybersource_rest_client/models/ptsv2paymentsid_processing_information_authorization_options_initiator.rb +2 -2
  59. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information_emv.rb +0 -2
  60. data/lib/cybersource_rest_client/models/ptsv2paymentsidvoids_order_information.rb +183 -0
  61. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information.rb +14 -4
  62. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +13 -4
  63. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_funding_options.rb +183 -0
  64. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_funding_options_initiator.rb +190 -0
  65. data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb +52 -4
  66. data/lib/cybersource_rest_client/models/reporting_v3_chargeback_details_get200_response_chargeback_details.rb +14 -4
  67. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +49 -1
  68. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_consumer_authentication_information.rb +44 -2
  69. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +35 -3
  70. data/lib/cybersource_rest_client/models/{tss_v2_transactions_post201_response__embedded_device_information.rb → riskv1authenticationresults_device_information.rb} +1 -1
  71. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +1 -1
  72. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +61 -2
  73. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +1 -1
  74. data/lib/cybersource_rest_client/models/riskv1decisions_consumer_authentication_information.rb +13 -3
  75. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
  76. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +10 -1
  77. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +1 -1
  78. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_customer.rb +1 -7
  79. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb +1 -1
  80. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options_initiator.rb +213 -0
  81. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb +14 -5
  82. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_bank.rb +183 -0
  83. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_bank_account.rb +194 -0
  84. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_customer.rb +184 -0
  85. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries.rb +1 -1
  86. data/lib/cybersource_rest_client/models/validate_request.rb +13 -4
  87. data/lib/cybersource_rest_client/models/void_capture_request.rb +13 -4
  88. data/lib/cybersource_rest_client/models/void_credit_request.rb +13 -4
  89. data/lib/cybersource_rest_client/models/void_payment_request.rb +13 -4
  90. data/lib/cybersource_rest_client/models/void_refund_request.rb +13 -4
  91. data/lib/cybersource_rest_client.rb +11 -1
  92. metadata +14 -4
@@ -0,0 +1,190 @@
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 Ptsv2paymentsProcessorInformationAuthorizationOptions
17
+ # #### Visa Platform Connect The field contains the PAN translation indicator for American Express Contactless Transaction. Valid value is  1- Expresspay Translation, PAN request 2- Expresspay Translation, PAN and Expiry date request
18
+ attr_accessor :pan_return_indicator
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'pan_return_indicator' => :'panReturnIndicator'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ :'pan_return_indicator' => :'String'
31
+ }
32
+ end
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ def initialize(attributes = {})
37
+ return unless attributes.is_a?(Hash)
38
+
39
+ # convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
+
42
+ if attributes.has_key?(:'panReturnIndicator')
43
+ self.pan_return_indicator = attributes[:'panReturnIndicator']
44
+ end
45
+ end
46
+
47
+ # Show invalid properties with the reasons. Usually used together with valid?
48
+ # @return Array for valid properties with the reasons
49
+ def list_invalid_properties
50
+ invalid_properties = Array.new
51
+ invalid_properties
52
+ end
53
+
54
+ # Check to see if the all the properties in the model are valid
55
+ # @return true if the model is valid
56
+ def valid?
57
+ true
58
+ end
59
+
60
+ # Custom attribute writer method with validation
61
+ # @param [Object] pan_return_indicator Value to be assigned
62
+ def pan_return_indicator=(pan_return_indicator)
63
+ @pan_return_indicator = pan_return_indicator
64
+ end
65
+
66
+ # Checks equality by comparing each attribute.
67
+ # @param [Object] Object to be compared
68
+ def ==(o)
69
+ return true if self.equal?(o)
70
+ self.class == o.class &&
71
+ pan_return_indicator == o.pan_return_indicator
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Fixnum] Hash code
82
+ def hash
83
+ [pan_return_indicator].hash
84
+ end
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def build_from_hash(attributes)
90
+ return nil unless attributes.is_a?(Hash)
91
+ self.class.swagger_types.each_pair do |key, type|
92
+ if type =~ /\AArray<(.*)>/i
93
+ # check to ensure the input is an array given that the the attribute
94
+ # is documented as an array but the input is not
95
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
96
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
97
+ end
98
+ elsif !attributes[self.class.attribute_map[key]].nil?
99
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
100
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
101
+ end
102
+
103
+ self
104
+ end
105
+
106
+ # Deserializes the data based on type
107
+ # @param string type Data type
108
+ # @param string value Value to be deserialized
109
+ # @return [Object] Deserialized data
110
+ def _deserialize(type, value)
111
+ case type.to_sym
112
+ when :DateTime
113
+ DateTime.parse(value)
114
+ when :Date
115
+ Date.parse(value)
116
+ when :String
117
+ value.to_s
118
+ when :Integer
119
+ value.to_i
120
+ when :Float
121
+ value.to_f
122
+ when :BOOLEAN
123
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
124
+ true
125
+ else
126
+ false
127
+ end
128
+ when :Object
129
+ # generic object (usually a Hash), return directly
130
+ value
131
+ when /\AArray<(?<inner_type>.+)>\z/
132
+ inner_type = Regexp.last_match[:inner_type]
133
+ value.map { |v| _deserialize(inner_type, v) }
134
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
135
+ k_type = Regexp.last_match[:k_type]
136
+ v_type = Regexp.last_match[:v_type]
137
+ {}.tap do |hash|
138
+ value.each do |k, v|
139
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
140
+ end
141
+ end
142
+ else # model
143
+ temp_model = CyberSource.const_get(type).new
144
+ temp_model.build_from_hash(value)
145
+ end
146
+ end
147
+
148
+ # Returns the string representation of the object
149
+ # @return [String] String presentation of the object
150
+ def to_s
151
+ to_hash.to_s
152
+ end
153
+
154
+ # to_body is an alias to to_hash (backward compatibility)
155
+ # @return [Hash] Returns the object in the form of hash
156
+ def to_body
157
+ to_hash
158
+ end
159
+
160
+ # Returns the object in the form of hash
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_hash
163
+ hash = {}
164
+ self.class.attribute_map.each_pair do |attr, param|
165
+ value = self.send(attr)
166
+ next if value.nil?
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ # Outputs non-array value in the form of hash
173
+ # For object, use to_hash. Otherwise, just return the value
174
+ # @param [Object] value Any valid value
175
+ # @return [Hash] Returns the value in the form of hash
176
+ def _to_hash(value)
177
+ if value.is_a?(Array)
178
+ value.compact.map { |v| _to_hash(v) }
179
+ elsif value.is_a?(Hash)
180
+ {}.tap do |hash|
181
+ value.each { |k, v| hash[k] = _to_hash(v) }
182
+ end
183
+ elsif value.respond_to? :to_hash
184
+ value.to_hash
185
+ else
186
+ value
187
+ end
188
+ end
189
+ end
190
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module CyberSource
16
16
  class Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator
17
- # Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file.
17
+ # Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **true** means the merchant-initiated transaction came from a card that was already stored on file. - **false** means the merchant-initiated transaction came from a card that was not stored on file.
18
18
  attr_accessor :stored_credential_used
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -27,7 +27,7 @@ module CyberSource
27
27
  # Attribute type mapping.
28
28
  def self.swagger_types
29
29
  {
30
- :'stored_credential_used' => :'String'
30
+ :'stored_credential_used' => :'BOOLEAN'
31
31
  }
32
32
  end
33
33
 
@@ -50,8 +50,6 @@ module CyberSource
50
50
 
51
51
  if attributes.has_key?(:'fallback')
52
52
  self.fallback = attributes[:'fallback']
53
- else
54
- self.fallback = false
55
53
  end
56
54
  end
57
55
 
@@ -0,0 +1,183 @@
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 Ptsv2paymentsidvoidsOrderInformation
17
+ attr_accessor :amount_details
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'amount_details' => :'amountDetails'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'amount_details' => :'Ptsv2paymentsidreversalsReversalInformationAmountDetails'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'amountDetails')
42
+ self.amount_details = attributes[:'amountDetails']
43
+ end
44
+ end
45
+
46
+ # Show invalid properties with the reasons. Usually used together with valid?
47
+ # @return Array for valid properties with the reasons
48
+ def list_invalid_properties
49
+ invalid_properties = Array.new
50
+ invalid_properties
51
+ end
52
+
53
+ # Check to see if the all the properties in the model are valid
54
+ # @return true if the model is valid
55
+ def valid?
56
+ true
57
+ end
58
+
59
+ # Checks equality by comparing each attribute.
60
+ # @param [Object] Object to be compared
61
+ def ==(o)
62
+ return true if self.equal?(o)
63
+ self.class == o.class &&
64
+ amount_details == o.amount_details
65
+ end
66
+
67
+ # @see the `==` method
68
+ # @param [Object] Object to be compared
69
+ def eql?(o)
70
+ self == o
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Fixnum] Hash code
75
+ def hash
76
+ [amount_details].hash
77
+ end
78
+
79
+ # Builds the object from hash
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ # @return [Object] Returns the model itself
82
+ def build_from_hash(attributes)
83
+ return nil unless attributes.is_a?(Hash)
84
+ self.class.swagger_types.each_pair do |key, type|
85
+ if type =~ /\AArray<(.*)>/i
86
+ # check to ensure the input is an array given that the the attribute
87
+ # is documented as an array but the input is not
88
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
89
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
90
+ end
91
+ elsif !attributes[self.class.attribute_map[key]].nil?
92
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
93
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
94
+ end
95
+
96
+ self
97
+ end
98
+
99
+ # Deserializes the data based on type
100
+ # @param string type Data type
101
+ # @param string value Value to be deserialized
102
+ # @return [Object] Deserialized data
103
+ def _deserialize(type, value)
104
+ case type.to_sym
105
+ when :DateTime
106
+ DateTime.parse(value)
107
+ when :Date
108
+ Date.parse(value)
109
+ when :String
110
+ value.to_s
111
+ when :Integer
112
+ value.to_i
113
+ when :Float
114
+ value.to_f
115
+ when :BOOLEAN
116
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
117
+ true
118
+ else
119
+ false
120
+ end
121
+ when :Object
122
+ # generic object (usually a Hash), return directly
123
+ value
124
+ when /\AArray<(?<inner_type>.+)>\z/
125
+ inner_type = Regexp.last_match[:inner_type]
126
+ value.map { |v| _deserialize(inner_type, v) }
127
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
128
+ k_type = Regexp.last_match[:k_type]
129
+ v_type = Regexp.last_match[:v_type]
130
+ {}.tap do |hash|
131
+ value.each do |k, v|
132
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
133
+ end
134
+ end
135
+ else # model
136
+ temp_model = CyberSource.const_get(type).new
137
+ temp_model.build_from_hash(value)
138
+ end
139
+ end
140
+
141
+ # Returns the string representation of the object
142
+ # @return [String] String presentation of the object
143
+ def to_s
144
+ to_hash.to_s
145
+ end
146
+
147
+ # to_body is an alias to to_hash (backward compatibility)
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_body
150
+ to_hash
151
+ end
152
+
153
+ # Returns the object in the form of hash
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_hash
156
+ hash = {}
157
+ self.class.attribute_map.each_pair do |attr, param|
158
+ value = self.send(attr)
159
+ next if value.nil?
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ # Outputs non-array value in the form of hash
166
+ # For object, use to_hash. Otherwise, just return the value
167
+ # @param [Object] value Any valid value
168
+ # @return [Hash] Returns the value in the form of hash
169
+ def _to_hash(value)
170
+ if value.is_a?(Array)
171
+ value.compact.map { |v| _to_hash(v) }
172
+ elsif value.is_a?(Hash)
173
+ {}.tap do |hash|
174
+ value.each { |k, v| hash[k] = _to_hash(v) }
175
+ end
176
+ elsif value.respond_to? :to_hash
177
+ value.to_hash
178
+ else
179
+ value
180
+ end
181
+ end
182
+ end
183
+ end
@@ -18,11 +18,15 @@ module CyberSource
18
18
 
19
19
  attr_accessor :bill_to
20
20
 
21
+ # #### Visa Platform Connect : This API will contain the Flag that specifies whether the payment is for the purchase of cryptocurrency. Additional values to add : This API will contain the Flag that specifies whether the payment is for the purchase of cryptocurrency. valid values are - Y/y, true - N/n, false
22
+ attr_accessor :is_cryptocurrency_purchase
23
+
21
24
  # Attribute mapping from ruby-style variable name to JSON key.
22
25
  def self.attribute_map
23
26
  {
24
27
  :'amount_details' => :'amountDetails',
25
- :'bill_to' => :'billTo'
28
+ :'bill_to' => :'billTo',
29
+ :'is_cryptocurrency_purchase' => :'isCryptocurrencyPurchase'
26
30
  }
27
31
  end
28
32
 
@@ -30,7 +34,8 @@ module CyberSource
30
34
  def self.swagger_types
31
35
  {
32
36
  :'amount_details' => :'Ptsv2payoutsOrderInformationAmountDetails',
33
- :'bill_to' => :'Ptsv2payoutsOrderInformationBillTo'
37
+ :'bill_to' => :'Ptsv2payoutsOrderInformationBillTo',
38
+ :'is_cryptocurrency_purchase' => :'String'
34
39
  }
35
40
  end
36
41
 
@@ -49,6 +54,10 @@ module CyberSource
49
54
  if attributes.has_key?(:'billTo')
50
55
  self.bill_to = attributes[:'billTo']
51
56
  end
57
+
58
+ if attributes.has_key?(:'isCryptocurrencyPurchase')
59
+ self.is_cryptocurrency_purchase = attributes[:'isCryptocurrencyPurchase']
60
+ end
52
61
  end
53
62
 
54
63
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -70,7 +79,8 @@ module CyberSource
70
79
  return true if self.equal?(o)
71
80
  self.class == o.class &&
72
81
  amount_details == o.amount_details &&
73
- bill_to == o.bill_to
82
+ bill_to == o.bill_to &&
83
+ is_cryptocurrency_purchase == o.is_cryptocurrency_purchase
74
84
  end
75
85
 
76
86
  # @see the `==` method
@@ -82,7 +92,7 @@ module CyberSource
82
92
  # Calculates hash code according to all attributes.
83
93
  # @return [Fixnum] Hash code
84
94
  def hash
85
- [amount_details, bill_to].hash
95
+ [amount_details, bill_to, is_cryptocurrency_purchase].hash
86
96
  end
87
97
 
88
98
  # Builds the object from hash
@@ -34,6 +34,8 @@ module CyberSource
34
34
  # This will send purpose of funds code for original credit transactions (OCTs).
35
35
  attr_accessor :purpose_of_payment
36
36
 
37
+ attr_accessor :funding_options
38
+
37
39
  # Attribute mapping from ruby-style variable name to JSON key.
38
40
  def self.attribute_map
39
41
  {
@@ -43,7 +45,8 @@ module CyberSource
43
45
  :'reconciliation_id' => :'reconciliationId',
44
46
  :'payouts_options' => :'payoutsOptions',
45
47
  :'transaction_reason' => :'transactionReason',
46
- :'purpose_of_payment' => :'purposeOfPayment'
48
+ :'purpose_of_payment' => :'purposeOfPayment',
49
+ :'funding_options' => :'fundingOptions'
47
50
  }
48
51
  end
49
52
 
@@ -56,7 +59,8 @@ module CyberSource
56
59
  :'reconciliation_id' => :'String',
57
60
  :'payouts_options' => :'Ptsv2payoutsProcessingInformationPayoutsOptions',
58
61
  :'transaction_reason' => :'String',
59
- :'purpose_of_payment' => :'String'
62
+ :'purpose_of_payment' => :'String',
63
+ :'funding_options' => :'Ptsv2payoutsProcessingInformationFundingOptions'
60
64
  }
61
65
  end
62
66
 
@@ -95,6 +99,10 @@ module CyberSource
95
99
  if attributes.has_key?(:'purposeOfPayment')
96
100
  self.purpose_of_payment = attributes[:'purposeOfPayment']
97
101
  end
102
+
103
+ if attributes.has_key?(:'fundingOptions')
104
+ self.funding_options = attributes[:'fundingOptions']
105
+ end
98
106
  end
99
107
 
100
108
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -157,7 +165,8 @@ module CyberSource
157
165
  reconciliation_id == o.reconciliation_id &&
158
166
  payouts_options == o.payouts_options &&
159
167
  transaction_reason == o.transaction_reason &&
160
- purpose_of_payment == o.purpose_of_payment
168
+ purpose_of_payment == o.purpose_of_payment &&
169
+ funding_options == o.funding_options
161
170
  end
162
171
 
163
172
  # @see the `==` method
@@ -169,7 +178,7 @@ module CyberSource
169
178
  # Calculates hash code according to all attributes.
170
179
  # @return [Fixnum] Hash code
171
180
  def hash
172
- [business_application_id, network_routing_order, commerce_indicator, reconciliation_id, payouts_options, transaction_reason, purpose_of_payment].hash
181
+ [business_application_id, network_routing_order, commerce_indicator, reconciliation_id, payouts_options, transaction_reason, purpose_of_payment, funding_options].hash
173
182
  end
174
183
 
175
184
  # Builds the object from hash
@@ -0,0 +1,183 @@
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 Ptsv2payoutsProcessingInformationFundingOptions
17
+ attr_accessor :initiator
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'initiator' => :'initiator'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'initiator' => :'Ptsv2payoutsProcessingInformationFundingOptionsInitiator'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'initiator')
42
+ self.initiator = attributes[:'initiator']
43
+ end
44
+ end
45
+
46
+ # Show invalid properties with the reasons. Usually used together with valid?
47
+ # @return Array for valid properties with the reasons
48
+ def list_invalid_properties
49
+ invalid_properties = Array.new
50
+ invalid_properties
51
+ end
52
+
53
+ # Check to see if the all the properties in the model are valid
54
+ # @return true if the model is valid
55
+ def valid?
56
+ true
57
+ end
58
+
59
+ # Checks equality by comparing each attribute.
60
+ # @param [Object] Object to be compared
61
+ def ==(o)
62
+ return true if self.equal?(o)
63
+ self.class == o.class &&
64
+ initiator == o.initiator
65
+ end
66
+
67
+ # @see the `==` method
68
+ # @param [Object] Object to be compared
69
+ def eql?(o)
70
+ self == o
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Fixnum] Hash code
75
+ def hash
76
+ [initiator].hash
77
+ end
78
+
79
+ # Builds the object from hash
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ # @return [Object] Returns the model itself
82
+ def build_from_hash(attributes)
83
+ return nil unless attributes.is_a?(Hash)
84
+ self.class.swagger_types.each_pair do |key, type|
85
+ if type =~ /\AArray<(.*)>/i
86
+ # check to ensure the input is an array given that the the attribute
87
+ # is documented as an array but the input is not
88
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
89
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
90
+ end
91
+ elsif !attributes[self.class.attribute_map[key]].nil?
92
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
93
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
94
+ end
95
+
96
+ self
97
+ end
98
+
99
+ # Deserializes the data based on type
100
+ # @param string type Data type
101
+ # @param string value Value to be deserialized
102
+ # @return [Object] Deserialized data
103
+ def _deserialize(type, value)
104
+ case type.to_sym
105
+ when :DateTime
106
+ DateTime.parse(value)
107
+ when :Date
108
+ Date.parse(value)
109
+ when :String
110
+ value.to_s
111
+ when :Integer
112
+ value.to_i
113
+ when :Float
114
+ value.to_f
115
+ when :BOOLEAN
116
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
117
+ true
118
+ else
119
+ false
120
+ end
121
+ when :Object
122
+ # generic object (usually a Hash), return directly
123
+ value
124
+ when /\AArray<(?<inner_type>.+)>\z/
125
+ inner_type = Regexp.last_match[:inner_type]
126
+ value.map { |v| _deserialize(inner_type, v) }
127
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
128
+ k_type = Regexp.last_match[:k_type]
129
+ v_type = Regexp.last_match[:v_type]
130
+ {}.tap do |hash|
131
+ value.each do |k, v|
132
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
133
+ end
134
+ end
135
+ else # model
136
+ temp_model = CyberSource.const_get(type).new
137
+ temp_model.build_from_hash(value)
138
+ end
139
+ end
140
+
141
+ # Returns the string representation of the object
142
+ # @return [String] String presentation of the object
143
+ def to_s
144
+ to_hash.to_s
145
+ end
146
+
147
+ # to_body is an alias to to_hash (backward compatibility)
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_body
150
+ to_hash
151
+ end
152
+
153
+ # Returns the object in the form of hash
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_hash
156
+ hash = {}
157
+ self.class.attribute_map.each_pair do |attr, param|
158
+ value = self.send(attr)
159
+ next if value.nil?
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ # Outputs non-array value in the form of hash
166
+ # For object, use to_hash. Otherwise, just return the value
167
+ # @param [Object] value Any valid value
168
+ # @return [Hash] Returns the value in the form of hash
169
+ def _to_hash(value)
170
+ if value.is_a?(Array)
171
+ value.compact.map { |v| _to_hash(v) }
172
+ elsif value.is_a?(Hash)
173
+ {}.tap do |hash|
174
+ value.each { |k, v| hash[k] = _to_hash(v) }
175
+ end
176
+ elsif value.respond_to? :to_hash
177
+ value.to_hash
178
+ else
179
+ value
180
+ end
181
+ end
182
+ end
183
+ end