Class: SplititWebApiV4::AuthorizeAuthorizationData

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/splitit_web_api_v4/models/authorize_authorization_data.rb

Overview

AuthorizeAuthorizationData 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(status: SKIP, splitit_error_result_code: SKIP, gateway_transaction_id: SKIP, gateway_result_code: SKIP, gateway_result_message: SKIP, three_ds_redirect: SKIP, cavv: SKIP, eci: SKIP, gateway_source_response: SKIP, additional_properties: nil) ⇒ AuthorizeAuthorizationData

Returns a new instance of AuthorizeAuthorizationData.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 83

def initialize(status: SKIP, splitit_error_result_code: SKIP,
               gateway_transaction_id: SKIP, gateway_result_code: SKIP,
               gateway_result_message: SKIP, three_ds_redirect: SKIP,
               cavv: SKIP, eci: SKIP, gateway_source_response: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @status = status unless status == SKIP
  unless splitit_error_result_code == SKIP
    @splitit_error_result_code =
      splitit_error_result_code
  end
  @gateway_transaction_id = gateway_transaction_id unless gateway_transaction_id == SKIP
  @gateway_result_code = gateway_result_code unless gateway_result_code == SKIP
  @gateway_result_message = gateway_result_message unless gateway_result_message == SKIP
  @three_ds_redirect = three_ds_redirect unless three_ds_redirect == SKIP
  @cavv = cavv unless cavv == SKIP
  @eci = eci unless eci == SKIP
  @gateway_source_response = gateway_source_response unless gateway_source_response == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#cavvString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 38

def cavv
  @cavv
end

#eciString

TODO: Write general description for this method

Returns:

  • (String)


42
43
44
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 42

def eci
  @eci
end

#gateway_result_codeString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 26

def gateway_result_code
  @gateway_result_code
end

#gateway_result_messageString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 30

def gateway_result_message
  @gateway_result_message
end

#gateway_source_responseString

TODO: Write general description for this method

Returns:

  • (String)


46
47
48
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 46

def gateway_source_response
  @gateway_source_response
end

#gateway_transaction_idString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 22

def gateway_transaction_id
  @gateway_transaction_id
end

#splitit_error_result_codeString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 18

def splitit_error_result_code
  @splitit_error_result_code
end

#statusString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 14

def status
  @status
end

#three_ds_redirectThreeDsRedirectData

TODO: Write general description for this method

Returns:



34
35
36
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 34

def three_ds_redirect
  @three_ds_redirect
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 107

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  status = hash.key?('Status') ? hash['Status'] : SKIP
  splitit_error_result_code =
    hash.key?('SplititErrorResultCode') ? hash['SplititErrorResultCode'] : SKIP
  gateway_transaction_id =
    hash.key?('GatewayTransactionID') ? hash['GatewayTransactionID'] : SKIP
  gateway_result_code =
    hash.key?('GatewayResultCode') ? hash['GatewayResultCode'] : SKIP
  gateway_result_message =
    hash.key?('GatewayResultMessage') ? hash['GatewayResultMessage'] : SKIP
  three_ds_redirect = ThreeDsRedirectData.from_hash(hash['ThreeDSRedirect']) if
    hash['ThreeDSRedirect']
  cavv = hash.key?('CAVV') ? hash['CAVV'] : SKIP
  eci = hash.key?('ECI') ? hash['ECI'] : SKIP
  gateway_source_response =
    hash.key?('GatewaySourceResponse') ? hash['GatewaySourceResponse'] : 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.
  AuthorizeAuthorizationData.new(status: status,
                                 splitit_error_result_code: splitit_error_result_code,
                                 gateway_transaction_id: gateway_transaction_id,
                                 gateway_result_code: gateway_result_code,
                                 gateway_result_message: gateway_result_message,
                                 three_ds_redirect: three_ds_redirect,
                                 cavv: cavv,
                                 eci: eci,
                                 gateway_source_response: gateway_source_response,
                                 additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 49

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['status'] = 'Status'
  @_hash['splitit_error_result_code'] = 'SplititErrorResultCode'
  @_hash['gateway_transaction_id'] = 'GatewayTransactionID'
  @_hash['gateway_result_code'] = 'GatewayResultCode'
  @_hash['gateway_result_message'] = 'GatewayResultMessage'
  @_hash['three_ds_redirect'] = 'ThreeDSRedirect'
  @_hash['cavv'] = 'CAVV'
  @_hash['eci'] = 'ECI'
  @_hash['gateway_source_response'] = 'GatewaySourceResponse'
  @_hash
end

.nullablesObject

An array for nullable fields



79
80
81
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 79

def self.nullables
  []
end

.optionalsObject

An array for optional fields



64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 64

def self.optionals
  %w[
    status
    splitit_error_result_code
    gateway_transaction_id
    gateway_result_code
    gateway_result_message
    three_ds_redirect
    cavv
    eci
    gateway_source_response
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



159
160
161
162
163
164
165
166
167
168
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 159

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} status: #{@status.inspect}, splitit_error_result_code:"\
  " #{@splitit_error_result_code.inspect}, gateway_transaction_id:"\
  " #{@gateway_transaction_id.inspect}, gateway_result_code: #{@gateway_result_code.inspect},"\
  " gateway_result_message: #{@gateway_result_message.inspect}, three_ds_redirect:"\
  " #{@three_ds_redirect.inspect}, cavv: #{@cavv.inspect}, eci: #{@eci.inspect},"\
  " gateway_source_response: #{@gateway_source_response.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



148
149
150
151
152
153
154
155
156
# File 'lib/splitit_web_api_v4/models/authorize_authorization_data.rb', line 148

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} status: #{@status}, splitit_error_result_code:"\
  " #{@splitit_error_result_code}, gateway_transaction_id: #{@gateway_transaction_id},"\
  " gateway_result_code: #{@gateway_result_code}, gateway_result_message:"\
  " #{@gateway_result_message}, three_ds_redirect: #{@three_ds_redirect}, cavv: #{@cavv}, eci:"\
  " #{@eci}, gateway_source_response: #{@gateway_source_response}, additional_properties:"\
  " #{@additional_properties}>"
end