Class: UnivapayClientSdk::TokenResponseOnlineData

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/univapay_client_sdk/models/token_response_online_data.rb

Overview

Token Response Online Data schema.

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(brand: SKIP, call_method: SKIP, os_type: SKIP, user_identifier: SKIP, user_identifier_source: SKIP, issuer_token: SKIP, issuer_token_payload: SKIP, additional_properties: nil) ⇒ TokenResponseOnlineData

Returns a new instance of TokenResponseOnlineData.



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 78

def initialize(brand: SKIP, call_method: SKIP, os_type: SKIP,
               user_identifier: SKIP, user_identifier_source: SKIP,
               issuer_token: SKIP, issuer_token_payload: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @brand = brand unless brand == SKIP
  @call_method = call_method unless call_method == SKIP
  @os_type = os_type unless os_type == SKIP
  @user_identifier = user_identifier unless user_identifier == SKIP
  @user_identifier_source = user_identifier_source unless user_identifier_source == SKIP
  @issuer_token = issuer_token unless issuer_token == SKIP
  @issuer_token_payload = issuer_token_payload unless issuer_token_payload == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#brandBaseOnlineDataBrand

Base Online Data Brand schema.

Returns:



14
15
16
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 14

def brand
  @brand
end

#call_methodBaseOnlineDataCallMethod

Base Online Data Call Method schema.



18
19
20
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 18

def call_method
  @call_method
end

#issuer_tokenString

Token provided by the issuer (if applicable).

Returns:

  • (String)


35
36
37
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 35

def issuer_token
  @issuer_token
end

#issuer_token_payloadString

Additional payload from the issuer.

Returns:

  • (String)


39
40
41
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 39

def issuer_token_payload
  @issuer_token_payload
end

#os_typeBaseOnlineDataOsType

Base Online Data Os Type schema.



22
23
24
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 22

def os_type
  @os_type
end

#user_identifierString

Consumer specific identifier required by some gateways for fraud prevention.

Returns:

  • (String)


27
28
29
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 27

def user_identifier
  @user_identifier
end

#user_identifier_sourceBaseOnlineDataUserIdentifierSource

The source of the user identifier



31
32
33
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 31

def user_identifier_source
  @user_identifier_source
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
127
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 96

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  brand = hash.key?('brand') ? hash['brand'] : SKIP
  call_method = hash.key?('call_method') ? hash['call_method'] : SKIP
  os_type = hash.key?('os_type') ? hash['os_type'] : SKIP
  user_identifier =
    hash.key?('user_identifier') ? hash['user_identifier'] : SKIP
  user_identifier_source =
    hash.key?('user_identifier_source') ? hash['user_identifier_source'] : SKIP
  issuer_token = hash.key?('issuer_token') ? hash['issuer_token'] : SKIP
  issuer_token_payload =
    hash.key?('issuer_token_payload') ? hash['issuer_token_payload'] : 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.
  TokenResponseOnlineData.new(brand: brand,
                              call_method: call_method,
                              os_type: os_type,
                              user_identifier: user_identifier,
                              user_identifier_source: user_identifier_source,
                              issuer_token: issuer_token,
                              issuer_token_payload: issuer_token_payload,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 42

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['brand'] = 'brand'
  @_hash['call_method'] = 'call_method'
  @_hash['os_type'] = 'os_type'
  @_hash['user_identifier'] = 'user_identifier'
  @_hash['user_identifier_source'] = 'user_identifier_source'
  @_hash['issuer_token'] = 'issuer_token'
  @_hash['issuer_token_payload'] = 'issuer_token_payload'
  @_hash
end

.nullablesObject

An array for nullable fields



68
69
70
71
72
73
74
75
76
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 68

def self.nullables
  %w[
    os_type
    user_identifier
    user_identifier_source
    issuer_token
    issuer_token_payload
  ]
end

.optionalsObject

An array for optional fields



55
56
57
58
59
60
61
62
63
64
65
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 55

def self.optionals
  %w[
    brand
    call_method
    os_type
    user_identifier
    user_identifier_source
    issuer_token
    issuer_token_payload
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



131
132
133
134
135
136
137
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 131

def self.validate(value)
  return true if value.instance_of? self

  return false unless value.instance_of? Hash

  true
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



149
150
151
152
153
154
155
156
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 149

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} brand: #{@brand.inspect}, call_method: #{@call_method.inspect}, os_type:"\
  " #{@os_type.inspect}, user_identifier: #{@user_identifier.inspect}, user_identifier_source:"\
  " #{@user_identifier_source.inspect}, issuer_token: #{@issuer_token.inspect},"\
  " issuer_token_payload: #{@issuer_token_payload.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



140
141
142
143
144
145
146
# File 'lib/univapay_client_sdk/models/token_response_online_data.rb', line 140

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} brand: #{@brand}, call_method: #{@call_method}, os_type: #{@os_type},"\
  " user_identifier: #{@user_identifier}, user_identifier_source: #{@user_identifier_source},"\
  " issuer_token: #{@issuer_token}, issuer_token_payload: #{@issuer_token_payload},"\
  " additional_properties: #{@additional_properties}>"
end