Class: CyberSourceMergedSpec::IssuerInformation2

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/cyber_source_merged_spec/models/issuer_information2.rb

Overview

IssuerInformation2 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(country: SKIP, discretionary_data: SKIP, country_specific_discretionary_data: SKIP, response_code: SKIP, pin_request_indicator: SKIP, additional_properties: nil) ⇒ IssuerInformation2

Returns a new instance of IssuerInformation2.



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 135

def initialize(country: SKIP, discretionary_data: SKIP,
               country_specific_discretionary_data: SKIP,
               response_code: SKIP, pin_request_indicator: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @country = country unless country == SKIP
  @discretionary_data = discretionary_data unless discretionary_data == SKIP
  unless country_specific_discretionary_data == SKIP
    @country_specific_discretionary_data =
      country_specific_discretionary_data
  end
  @response_code = response_code unless response_code == SKIP
  @pin_request_indicator = pin_request_indicator unless pin_request_indicator == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#countryString

Country in which the card was issued. This information enables you to determine whether the card was issued domestically or internationally. Use the two-character [ISO Standard Country Codes](https://developer.cybersource.com/library/documentation/sbc/quickre f/countries_alpha_list.pdf). This field is supported for Visa, Mastercard, Discover, Diners Club, JCB, and Maestro (International) on Chase Paymentech Solutions.

Returns:

  • (String)


22
23
24
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 22

def country
  @country
end

#country_specific_discretionary_dataString

Data defined by the issuer. This national use field contains two subfields for information unique to the processing of Visa transactions by members in Japan. This subfield contains the Katakana text to be printed on the receipt.

Returns:

  • (String)


38
39
40
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 38

def country_specific_discretionary_data
  @country_specific_discretionary_data
end

#discretionary_dataString

Data defined by the issuer. The value for this reply field will probably be the same as the value that you submitted in the authorization request, but it is possible for the processor, issuer, or acquirer to modify the value. This field is supported only for Visa transactions on CyberSource through VisaNet.

Returns:

  • (String)


31
32
33
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 31

def discretionary_data
  @discretionary_data
end

#pin_request_indicatorString

This field contains value ‘1’ which is sent by Issuer in the response when PIN is requested by issuer, This field is only supported for Visa Platform Connect.

Returns:

  • (String)


105
106
107
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 105

def pin_request_indicator
  @pin_request_indicator
end

#response_codeString

This is the raw Association/Issuer Response Codes. You can use ‘issuer/association’ response codes to identify when you can retry to authorize a declined transaction and increase successful transaction volumes. You’ll receive an association/issuer response code for the majority of transactions.

Processors supported:

- HSBC
- FDC Nashville Global
- SIX

Currently SIX is not receiving Association/Issuer Response Codes here it receives the additional authorization code that must be printed on the receipt when returned by the processor.

Possible values:

| Card Type | Response Code | Description | | ----------- | ------------- |

---- | | VISA | 000 | Successful approval/completion or that V.I.P. PIN verification is successful | | VISA | 001 | Refer to card issuer | | VISA | 002 | Refer to card issuer, special condition | | VISA | 003 | Invalid merchant or service provider | | VISA | 004 | Pickup card |
| MasterCard | 000 | Approved or completed successfully | | MasterCard | 001 | Refer to card issuer | | MasterCard | 003 | Invalid merchant | | MasterCard | 004 | Capture card | | MasterCard | 005 | Do not honor | | AMEX | 000 | Approved | | AMEX | 001 | Approve with ID | | AMEX | 002 | Partial Approval (Prepaid Cards only) | | AMEX | 100 | Deny | | AMEX | 101 | Expired Card/Invalid Expiration Date | | Discover | 000 | Approved or completed successfully | | Discover | 001 | Reserved for future USE | | Discover | 002 | Reserved for future USE | | Discover | 003 | Invalid Merchant | | Discover | 004 | Capture Card |

Returns:

  • (String)


99
100
101
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 99

def response_code
  @response_code
end

Class Method Details

.from_element(root) ⇒ Object



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 183

def self.from_element(root)
  country = XmlUtilities.from_element(root, 'country', String)
  discretionary_data = XmlUtilities.from_element(root, 'discretionaryData',
                                                 String)
  country_specific_discretionary_data = XmlUtilities.from_element(
    root, 'countrySpecificDiscretionaryData', String
  )
  response_code = XmlUtilities.from_element(root, 'responseCode', String)
  pin_request_indicator = XmlUtilities.from_element(root,
                                                    'pinRequestIndicator',
                                                    String)

  new(country: country,
      discretionary_data: discretionary_data,
      country_specific_discretionary_data: country_specific_discretionary_data,
      response_code: response_code,
      pin_request_indicator: pin_request_indicator,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 154

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  country = hash.key?('country') ? hash['country'] : SKIP
  discretionary_data =
    hash.key?('discretionaryData') ? hash['discretionaryData'] : SKIP
  country_specific_discretionary_data =
    hash.key?('countrySpecificDiscretionaryData') ? hash['countrySpecificDiscretionaryData'] : SKIP
  response_code = hash.key?('responseCode') ? hash['responseCode'] : SKIP
  pin_request_indicator =
    hash.key?('pinRequestIndicator') ? hash['pinRequestIndicator'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  IssuerInformation2.new(country: country,
                         discretionary_data: discretionary_data,
                         country_specific_discretionary_data: country_specific_discretionary_data,
                         response_code: response_code,
                         pin_request_indicator: pin_request_indicator,
                         additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



108
109
110
111
112
113
114
115
116
117
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 108

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['country'] = 'country'
  @_hash['discretionary_data'] = 'discretionaryData'
  @_hash['country_specific_discretionary_data'] =
    'countrySpecificDiscretionaryData'
  @_hash['response_code'] = 'responseCode'
  @_hash['pin_request_indicator'] = 'pinRequestIndicator'
  @_hash
end

.nullablesObject

An array for nullable fields



131
132
133
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 131

def self.nullables
  []
end

.optionalsObject

An array for optional fields



120
121
122
123
124
125
126
127
128
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 120

def self.optionals
  %w[
    country
    discretionary_data
    country_specific_discretionary_data
    response_code
    pin_request_indicator
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



231
232
233
234
235
236
237
238
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 231

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} country: #{@country.inspect}, discretionary_data:"\
  " #{@discretionary_data.inspect}, country_specific_discretionary_data:"\
  " #{@country_specific_discretionary_data.inspect}, response_code: #{@response_code.inspect},"\
  " pin_request_indicator: #{@pin_request_indicator.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



222
223
224
225
226
227
228
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 222

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} country: #{@country}, discretionary_data: #{@discretionary_data},"\
  " country_specific_discretionary_data: #{@country_specific_discretionary_data},"\
  " response_code: #{@response_code}, pin_request_indicator: #{@pin_request_indicator},"\
  " additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/cyber_source_merged_spec/models/issuer_information2.rb', line 203

def to_xml_element(doc, root_name)
  root = doc.create_element(root_name)

  XmlUtilities.add_as_subelement(doc, root, 'country', country)
  XmlUtilities.add_as_subelement(doc, root, 'discretionaryData',
                                 discretionary_data)
  XmlUtilities.add_as_subelement(doc, root,
                                 'countrySpecificDiscretionaryData',
                                 country_specific_discretionary_data)
  XmlUtilities.add_as_subelement(doc, root, 'responseCode', response_code)
  XmlUtilities.add_as_subelement(doc, root, 'pinRequestIndicator',
                                 pin_request_indicator)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end