Class: CyberSourceMergedSpec::Capabilities

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

Overview

Flags indicating what authentication, binding, and trusted-beneficiary enrollment capabilities the issuer supports. Supported only for VTS Tokens.

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(device_binding_supported: SKIP, cardholder_verification_supported: SKIP, trusted_beneficiary_enrollment_supported: SKIP, delegated_authentication_supported: SKIP, obo_device_binding_supported: SKIP, token_lcm_notifications_supported: SKIP, fpan_lcm_notifications_supported: SKIP, additional_properties: nil) ⇒ Capabilities

Returns a new instance of Capabilities.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 89

def initialize(device_binding_supported: SKIP,
               cardholder_verification_supported: SKIP,
               trusted_beneficiary_enrollment_supported: SKIP,
               delegated_authentication_supported: SKIP,
               obo_device_binding_supported: SKIP,
               token_lcm_notifications_supported: SKIP,
               fpan_lcm_notifications_supported: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @device_binding_supported = device_binding_supported unless device_binding_supported == SKIP
  unless cardholder_verification_supported == SKIP
    @cardholder_verification_supported =
      cardholder_verification_supported
  end
  unless trusted_beneficiary_enrollment_supported == SKIP
    @trusted_beneficiary_enrollment_supported =
      trusted_beneficiary_enrollment_supported
  end
  unless delegated_authentication_supported == SKIP
    @delegated_authentication_supported =
      delegated_authentication_supported
  end
  unless obo_device_binding_supported == SKIP
    @obo_device_binding_supported =
      obo_device_binding_supported
  end
  unless token_lcm_notifications_supported == SKIP
    @token_lcm_notifications_supported =
      token_lcm_notifications_supported
  end
  unless fpan_lcm_notifications_supported == SKIP
    @fpan_lcm_notifications_supported =
      fpan_lcm_notifications_supported
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#cardholder_verification_supportedTrueClass | FalseClass

Indicates if the issuer participates in step-up authentication that requires cardholder verification.

Returns:

  • (TrueClass | FalseClass)


20
21
22
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 20

def cardholder_verification_supported
  @cardholder_verification_supported
end

#delegated_authentication_supportedTrueClass | FalseClass

Indicates if the issuer supports delegated authentication. e.g allowing approved thrird parties to perform authentication on behalf of the issuer.

Returns:

  • (TrueClass | FalseClass)


32
33
34
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 32

def delegated_authentication_supported
  @delegated_authentication_supported
end

#device_binding_supportedTrueClass | FalseClass

Indicates if the issuer supports device binding.

Returns:

  • (TrueClass | FalseClass)


15
16
17
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 15

def device_binding_supported
  @device_binding_supported
end

#fpan_lcm_notifications_supportedTrueClass | FalseClass

Indicates if the issuer supports receiving PAN lifecycle management notifications. e.g receiving updates on changes to the underlying card's status or attributes.

Returns:

  • (TrueClass | FalseClass)


51
52
53
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 51

def fpan_lcm_notifications_supported
  @fpan_lcm_notifications_supported
end

#obo_device_binding_supportedTrueClass | FalseClass

Indicates if the issuer supports on-behalf-of device binding. e.g allowing approved third parties to perform device binding on behalf of the issuer.

Returns:

  • (TrueClass | FalseClass)


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

def obo_device_binding_supported
  @obo_device_binding_supported
end

#token_lcm_notifications_supportedTrueClass | FalseClass

Indicates if the issuer supports receiving token lifecycle management notifications. e.g receiving updates on changes to the token's status or attributes.

Returns:

  • (TrueClass | FalseClass)


44
45
46
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 44

def token_lcm_notifications_supported
  @token_lcm_notifications_supported
end

#trusted_beneficiary_enrollment_supportedTrueClass | FalseClass

Indicates if the issuer supports trusted beneficiary enrollment. e.g allowing cardholders to designate trusted merchants or payment recipients that can be exempt from step-up authentication.

Returns:

  • (TrueClass | FalseClass)


26
27
28
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 26

def trusted_beneficiary_enrollment_supported
  @trusted_beneficiary_enrollment_supported
end

Class Method Details

.from_element(root) ⇒ Object



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 166

def self.from_element(root)
  device_binding_supported = XmlUtilities.from_element(
    root, 'deviceBindingSupported', TrueClass
  )
  cardholder_verification_supported = XmlUtilities.from_element(
    root, 'cardholderVerificationSupported', TrueClass
  )
  trusted_beneficiary_enrollment_supported = XmlUtilities.from_element(
    root, 'trustedBeneficiaryEnrollmentSupported', TrueClass
  )
  delegated_authentication_supported = XmlUtilities.from_element(
    root, 'delegatedAuthenticationSupported', TrueClass
  )
  obo_device_binding_supported = XmlUtilities.from_element(
    root, 'oboDeviceBindingSupported', TrueClass
  )
  token_lcm_notifications_supported = XmlUtilities.from_element(
    root, 'tokenLcmNotificationsSupported', TrueClass
  )
  fpan_lcm_notifications_supported = XmlUtilities.from_element(
    root, 'fpanLcmNotificationsSupported', TrueClass
  )

  new(device_binding_supported: device_binding_supported,
      cardholder_verification_supported: cardholder_verification_supported,
      trusted_beneficiary_enrollment_supported: trusted_beneficiary_enrollment_supported,
      delegated_authentication_supported: delegated_authentication_supported,
      obo_device_binding_supported: obo_device_binding_supported,
      token_lcm_notifications_supported: token_lcm_notifications_supported,
      fpan_lcm_notifications_supported: fpan_lcm_notifications_supported,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 129

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  device_binding_supported =
    hash.key?('deviceBindingSupported') ? hash['deviceBindingSupported'] : SKIP
  cardholder_verification_supported =
    hash.key?('cardholderVerificationSupported') ? hash['cardholderVerificationSupported'] : SKIP
  trusted_beneficiary_enrollment_supported =
    hash.key?('trustedBeneficiaryEnrollmentSupported') ? hash['trustedBeneficiaryEnrollmentSupported'] : SKIP
  delegated_authentication_supported =
    hash.key?('delegatedAuthenticationSupported') ? hash['delegatedAuthenticationSupported'] : SKIP
  obo_device_binding_supported =
    hash.key?('oboDeviceBindingSupported') ? hash['oboDeviceBindingSupported'] : SKIP
  token_lcm_notifications_supported =
    hash.key?('tokenLcmNotificationsSupported') ? hash['tokenLcmNotificationsSupported'] : SKIP
  fpan_lcm_notifications_supported =
    hash.key?('fpanLcmNotificationsSupported') ? hash['fpanLcmNotificationsSupported'] : 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.
  Capabilities.new(device_binding_supported: device_binding_supported,
                   cardholder_verification_supported: cardholder_verification_supported,
                   trusted_beneficiary_enrollment_supported: trusted_beneficiary_enrollment_supported,
                   delegated_authentication_supported: delegated_authentication_supported,
                   obo_device_binding_supported: obo_device_binding_supported,
                   token_lcm_notifications_supported: token_lcm_notifications_supported,
                   fpan_lcm_notifications_supported: fpan_lcm_notifications_supported,
                   additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 54

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['device_binding_supported'] = 'deviceBindingSupported'
  @_hash['cardholder_verification_supported'] =
    'cardholderVerificationSupported'
  @_hash['trusted_beneficiary_enrollment_supported'] =
    'trustedBeneficiaryEnrollmentSupported'
  @_hash['delegated_authentication_supported'] =
    'delegatedAuthenticationSupported'
  @_hash['obo_device_binding_supported'] = 'oboDeviceBindingSupported'
  @_hash['token_lcm_notifications_supported'] =
    'tokenLcmNotificationsSupported'
  @_hash['fpan_lcm_notifications_supported'] =
    'fpanLcmNotificationsSupported'
  @_hash
end

.nullablesObject

An array for nullable fields



85
86
87
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 85

def self.nullables
  []
end

.optionalsObject

An array for optional fields



72
73
74
75
76
77
78
79
80
81
82
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 72

def self.optionals
  %w[
    device_binding_supported
    cardholder_verification_supported
    trusted_beneficiary_enrollment_supported
    delegated_authentication_supported
    obo_device_binding_supported
    token_lcm_notifications_supported
    fpan_lcm_notifications_supported
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 240

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} device_binding_supported: #{@device_binding_supported.inspect},"\
  " cardholder_verification_supported: #{@cardholder_verification_supported.inspect},"\
  ' trusted_beneficiary_enrollment_supported:'\
  " #{@trusted_beneficiary_enrollment_supported.inspect}, delegated_authentication_supported:"\
  " #{@delegated_authentication_supported.inspect}, obo_device_binding_supported:"\
  " #{@obo_device_binding_supported.inspect}, token_lcm_notifications_supported:"\
  " #{@token_lcm_notifications_supported.inspect}, fpan_lcm_notifications_supported:"\
  " #{@fpan_lcm_notifications_supported.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



227
228
229
230
231
232
233
234
235
236
237
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 227

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} device_binding_supported: #{@device_binding_supported},"\
  " cardholder_verification_supported: #{@cardholder_verification_supported},"\
  " trusted_beneficiary_enrollment_supported: #{@trusted_beneficiary_enrollment_supported},"\
  " delegated_authentication_supported: #{@delegated_authentication_supported},"\
  " obo_device_binding_supported: #{@obo_device_binding_supported},"\
  " token_lcm_notifications_supported: #{@token_lcm_notifications_supported},"\
  " fpan_lcm_notifications_supported: #{@fpan_lcm_notifications_supported},"\
  " additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/cyber_source_merged_spec/models/capabilities.rb', line 199

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

  XmlUtilities.add_as_subelement(doc, root, 'deviceBindingSupported',
                                 device_binding_supported)
  XmlUtilities.add_as_subelement(doc, root,
                                 'cardholderVerificationSupported',
                                 cardholder_verification_supported)
  XmlUtilities.add_as_subelement(doc, root,
                                 'trustedBeneficiaryEnrollmentSupported',
                                 trusted_beneficiary_enrollment_supported)
  XmlUtilities.add_as_subelement(doc, root,
                                 'delegatedAuthenticationSupported',
                                 delegated_authentication_supported)
  XmlUtilities.add_as_subelement(doc, root, 'oboDeviceBindingSupported',
                                 obo_device_binding_supported)
  XmlUtilities.add_as_subelement(doc, root,
                                 'tokenLcmNotificationsSupported',
                                 token_lcm_notifications_supported)
  XmlUtilities.add_as_subelement(doc, root, 'fpanLcmNotificationsSupported',
                                 fpan_lcm_notifications_supported)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end