Class: UnivapayClientSdk::MerchantWebhookUserTransactionsConfiguration

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

Overview

Merchant transaction notification settings.

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(enabled: SKIP, notify_customer: SKIP, notify_on_test: SKIP, notify_on_recurring_token_creation: SKIP, notify_on_recurring_token_cvv_failed: SKIP, notify_on_webhook_failure: SKIP, notify_on_webhook_disabled: SKIP, notify_user_on_failed_transactions: SKIP, notify_customer_on_failed_transactions: SKIP, notify_user_on_convenience_instructions: SKIP, notify_on_subscriptions: SKIP, notify_on_authorizations: SKIP, notify_on_cvv_authorizations: SKIP, notify_on_cancels: SKIP, customer_refer_link_enabled: SKIP, notify_on_convenience_expiry: SKIP, notify_on_recurring_token_creation_with_three_ds: SKIP, notify_on_chargebacks: SKIP, additional_properties: nil) ⇒ MerchantWebhookUserTransactionsConfiguration

Returns a new instance of MerchantWebhookUserTransactionsConfiguration.



162
163
164
165
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
198
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
225
226
227
228
229
230
231
232
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 162

def initialize(enabled: SKIP, notify_customer: SKIP, notify_on_test: SKIP,
               notify_on_recurring_token_creation: SKIP,
               notify_on_recurring_token_cvv_failed: SKIP,
               notify_on_webhook_failure: SKIP,
               notify_on_webhook_disabled: SKIP,
               notify_user_on_failed_transactions: SKIP,
               notify_customer_on_failed_transactions: SKIP,
               notify_user_on_convenience_instructions: SKIP,
               notify_on_subscriptions: SKIP,
               notify_on_authorizations: SKIP,
               notify_on_cvv_authorizations: SKIP, notify_on_cancels: SKIP,
               customer_refer_link_enabled: SKIP,
               notify_on_convenience_expiry: SKIP,
               notify_on_recurring_token_creation_with_three_ds: SKIP,
               notify_on_chargebacks: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @enabled = enabled unless enabled == SKIP
  @notify_customer = notify_customer unless notify_customer == SKIP
  @notify_on_test = notify_on_test unless notify_on_test == SKIP
  unless notify_on_recurring_token_creation == SKIP
    @notify_on_recurring_token_creation =
      notify_on_recurring_token_creation
  end
  unless notify_on_recurring_token_cvv_failed == SKIP
    @notify_on_recurring_token_cvv_failed =
      notify_on_recurring_token_cvv_failed
  end
  unless notify_on_webhook_failure == SKIP
    @notify_on_webhook_failure =
      notify_on_webhook_failure
  end
  unless notify_on_webhook_disabled == SKIP
    @notify_on_webhook_disabled =
      notify_on_webhook_disabled
  end
  unless notify_user_on_failed_transactions == SKIP
    @notify_user_on_failed_transactions =
      notify_user_on_failed_transactions
  end
  unless notify_customer_on_failed_transactions == SKIP
    @notify_customer_on_failed_transactions =
      notify_customer_on_failed_transactions
  end
  unless notify_user_on_convenience_instructions == SKIP
    @notify_user_on_convenience_instructions =
      notify_user_on_convenience_instructions
  end
  @notify_on_subscriptions = notify_on_subscriptions unless notify_on_subscriptions == SKIP
  @notify_on_authorizations = notify_on_authorizations unless notify_on_authorizations == SKIP
  unless notify_on_cvv_authorizations == SKIP
    @notify_on_cvv_authorizations =
      notify_on_cvv_authorizations
  end
  @notify_on_cancels = notify_on_cancels unless notify_on_cancels == SKIP
  unless customer_refer_link_enabled == SKIP
    @customer_refer_link_enabled =
      customer_refer_link_enabled
  end
  unless notify_on_convenience_expiry == SKIP
    @notify_on_convenience_expiry =
      notify_on_convenience_expiry
  end
  unless notify_on_recurring_token_creation_with_three_ds == SKIP
    @notify_on_recurring_token_creation_with_three_ds =
      notify_on_recurring_token_creation_with_three_ds
  end
  @notify_on_chargebacks = notify_on_chargebacks unless notify_on_chargebacks == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

Includes customer self-service links in supported notifications.

Returns:

  • (TrueClass | FalseClass)


70
71
72
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 70

def customer_refer_link_enabled
  @customer_refer_link_enabled
end

#enabledTrueClass | FalseClass

Enables merchant transaction notifications.

Returns:

  • (TrueClass | FalseClass)


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

def enabled
  @enabled
end

#notify_customerTrueClass | FalseClass

Sends transaction notifications to the customer.

Returns:

  • (TrueClass | FalseClass)


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

def notify_customer
  @notify_customer
end

#notify_customer_on_failed_transactionsTrueClass | FalseClass

Sends customer notifications for failed transactions.

Returns:

  • (TrueClass | FalseClass)


46
47
48
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 46

def notify_customer_on_failed_transactions
  @notify_customer_on_failed_transactions
end

#notify_on_authorizationsTrueClass | FalseClass

Sends notifications for authorization-only charges.

Returns:

  • (TrueClass | FalseClass)


58
59
60
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 58

def notify_on_authorizations
  @notify_on_authorizations
end

#notify_on_cancelsTrueClass | FalseClass

Sends notifications when charges are canceled.

Returns:

  • (TrueClass | FalseClass)


66
67
68
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 66

def notify_on_cancels
  @notify_on_cancels
end

#notify_on_chargebacksTrueClass | FalseClass

Sends notifications for chargeback events.

Returns:

  • (TrueClass | FalseClass)


82
83
84
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 82

def notify_on_chargebacks
  @notify_on_chargebacks
end

#notify_on_convenience_expiryTrueClass | FalseClass

Sends notifications when convenience payments expire.

Returns:

  • (TrueClass | FalseClass)


74
75
76
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 74

def notify_on_convenience_expiry
  @notify_on_convenience_expiry
end

#notify_on_cvv_authorizationsTrueClass | FalseClass

Sends notifications for CVV authorization events.

Returns:

  • (TrueClass | FalseClass)


62
63
64
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 62

def notify_on_cvv_authorizations
  @notify_on_cvv_authorizations
end

#notify_on_recurring_token_creationTrueClass | FalseClass

Sends notifications when a recurring token is created.

Returns:

  • (TrueClass | FalseClass)


26
27
28
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 26

def notify_on_recurring_token_creation
  @notify_on_recurring_token_creation
end

#notify_on_recurring_token_creation_with_three_dsTrueClass | FalseClass

Sends notifications when recurring tokens are created through 3-D Secure.

Returns:

  • (TrueClass | FalseClass)


78
79
80
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 78

def notify_on_recurring_token_creation_with_three_ds
  @notify_on_recurring_token_creation_with_three_ds
end

#notify_on_recurring_token_cvv_failedTrueClass | FalseClass

Sends notifications when recurring-token CVV confirmation fails.

Returns:

  • (TrueClass | FalseClass)


30
31
32
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 30

def notify_on_recurring_token_cvv_failed
  @notify_on_recurring_token_cvv_failed
end

#notify_on_subscriptionsTrueClass | FalseClass

Sends notifications for subscription lifecycle events.

Returns:

  • (TrueClass | FalseClass)


54
55
56
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 54

def notify_on_subscriptions
  @notify_on_subscriptions
end

#notify_on_testTrueClass | FalseClass

Sends notifications for test-mode events.

Returns:

  • (TrueClass | FalseClass)


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

def notify_on_test
  @notify_on_test
end

#notify_on_webhook_disabledTrueClass | FalseClass

Sends notifications when webhook delivery is disabled.

Returns:

  • (TrueClass | FalseClass)


38
39
40
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 38

def notify_on_webhook_disabled
  @notify_on_webhook_disabled
end

#notify_on_webhook_failureTrueClass | FalseClass

Sends notifications after repeated webhook delivery failures.

Returns:

  • (TrueClass | FalseClass)


34
35
36
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 34

def notify_on_webhook_failure
  @notify_on_webhook_failure
end

#notify_user_on_convenience_instructionsTrueClass | FalseClass

Sends merchant notifications with convenience-store payment instructions.

Returns:

  • (TrueClass | FalseClass)


50
51
52
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 50

def notify_user_on_convenience_instructions
  @notify_user_on_convenience_instructions
end

#notify_user_on_failed_transactionsTrueClass | FalseClass

Sends merchant notifications for failed transactions.

Returns:

  • (TrueClass | FalseClass)


42
43
44
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 42

def notify_user_on_failed_transactions
  @notify_user_on_failed_transactions
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 235

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  enabled = hash.key?('enabled') ? hash['enabled'] : SKIP
  notify_customer =
    hash.key?('notify_customer') ? hash['notify_customer'] : SKIP
  notify_on_test =
    hash.key?('notify_on_test') ? hash['notify_on_test'] : SKIP
  notify_on_recurring_token_creation =
    hash.key?('notify_on_recurring_token_creation') ? hash['notify_on_recurring_token_creation'] : SKIP
  notify_on_recurring_token_cvv_failed =
    hash.key?('notify_on_recurring_token_cvv_failed') ? hash['notify_on_recurring_token_cvv_failed'] : SKIP
  notify_on_webhook_failure =
    hash.key?('notify_on_webhook_failure') ? hash['notify_on_webhook_failure'] : SKIP
  notify_on_webhook_disabled =
    hash.key?('notify_on_webhook_disabled') ? hash['notify_on_webhook_disabled'] : SKIP
  notify_user_on_failed_transactions =
    hash.key?('notify_user_on_failed_transactions') ? hash['notify_user_on_failed_transactions'] : SKIP
  notify_customer_on_failed_transactions =
    hash.key?('notify_customer_on_failed_transactions') ? hash['notify_customer_on_failed_transactions'] : SKIP
  notify_user_on_convenience_instructions =
    hash.key?('notify_user_on_convenience_instructions') ? hash['notify_user_on_convenience_instructions'] : SKIP
  notify_on_subscriptions =
    hash.key?('notify_on_subscriptions') ? hash['notify_on_subscriptions'] : SKIP
  notify_on_authorizations =
    hash.key?('notify_on_authorizations') ? hash['notify_on_authorizations'] : SKIP
  notify_on_cvv_authorizations =
    hash.key?('notify_on_cvv_authorizations') ? hash['notify_on_cvv_authorizations'] : SKIP
  notify_on_cancels =
    hash.key?('notify_on_cancels') ? hash['notify_on_cancels'] : SKIP
  customer_refer_link_enabled =
    hash.key?('customer_refer_link_enabled') ? hash['customer_refer_link_enabled'] : SKIP
  notify_on_convenience_expiry =
    hash.key?('notify_on_convenience_expiry') ? hash['notify_on_convenience_expiry'] : SKIP
  notify_on_recurring_token_creation_with_three_ds =
    hash.key?('notify_on_recurring_token_creation_with_three_ds') ? hash['notify_on_recurring_token_creation_with_three_ds'] : SKIP
  notify_on_chargebacks =
    hash.key?('notify_on_chargebacks') ? hash['notify_on_chargebacks'] : 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.
  MerchantWebhookUserTransactionsConfiguration.new(enabled: enabled,
                                                   notify_customer: notify_customer,
                                                   notify_on_test: notify_on_test,
                                                   notify_on_recurring_token_creation: notify_on_recurring_token_creation,
                                                   notify_on_recurring_token_cvv_failed: notify_on_recurring_token_cvv_failed,
                                                   notify_on_webhook_failure: notify_on_webhook_failure,
                                                   notify_on_webhook_disabled: notify_on_webhook_disabled,
                                                   notify_user_on_failed_transactions: notify_user_on_failed_transactions,
                                                   notify_customer_on_failed_transactions: notify_customer_on_failed_transactions,
                                                   notify_user_on_convenience_instructions: notify_user_on_convenience_instructions,
                                                   notify_on_subscriptions: notify_on_subscriptions,
                                                   notify_on_authorizations: notify_on_authorizations,
                                                   notify_on_cvv_authorizations: notify_on_cvv_authorizations,
                                                   notify_on_cancels: notify_on_cancels,
                                                   customer_refer_link_enabled: customer_refer_link_enabled,
                                                   notify_on_convenience_expiry: notify_on_convenience_expiry,
                                                   notify_on_recurring_token_creation_with_three_ds: notify_on_recurring_token_creation_with_three_ds,
                                                   notify_on_chargebacks: notify_on_chargebacks,
                                                   additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 85

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['enabled'] = 'enabled'
  @_hash['notify_customer'] = 'notify_customer'
  @_hash['notify_on_test'] = 'notify_on_test'
  @_hash['notify_on_recurring_token_creation'] =
    'notify_on_recurring_token_creation'
  @_hash['notify_on_recurring_token_cvv_failed'] =
    'notify_on_recurring_token_cvv_failed'
  @_hash['notify_on_webhook_failure'] = 'notify_on_webhook_failure'
  @_hash['notify_on_webhook_disabled'] = 'notify_on_webhook_disabled'
  @_hash['notify_user_on_failed_transactions'] =
    'notify_user_on_failed_transactions'
  @_hash['notify_customer_on_failed_transactions'] =
    'notify_customer_on_failed_transactions'
  @_hash['notify_user_on_convenience_instructions'] =
    'notify_user_on_convenience_instructions'
  @_hash['notify_on_subscriptions'] = 'notify_on_subscriptions'
  @_hash['notify_on_authorizations'] = 'notify_on_authorizations'
  @_hash['notify_on_cvv_authorizations'] = 'notify_on_cvv_authorizations'
  @_hash['notify_on_cancels'] = 'notify_on_cancels'
  @_hash['customer_refer_link_enabled'] = 'customer_refer_link_enabled'
  @_hash['notify_on_convenience_expiry'] = 'notify_on_convenience_expiry'
  @_hash['notify_on_recurring_token_creation_with_three_ds'] =
    'notify_on_recurring_token_creation_with_three_ds'
  @_hash['notify_on_chargebacks'] = 'notify_on_chargebacks'
  @_hash
end

.nullablesObject

An array for nullable fields



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 139

def self.nullables
  %w[
    enabled
    notify_customer
    notify_on_test
    notify_on_recurring_token_creation
    notify_on_recurring_token_cvv_failed
    notify_on_webhook_failure
    notify_on_webhook_disabled
    notify_user_on_failed_transactions
    notify_customer_on_failed_transactions
    notify_user_on_convenience_instructions
    notify_on_subscriptions
    notify_on_authorizations
    notify_on_cvv_authorizations
    notify_on_cancels
    customer_refer_link_enabled
    notify_on_convenience_expiry
    notify_on_recurring_token_creation_with_three_ds
    notify_on_chargebacks
  ]
end

.optionalsObject

An array for optional fields



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 115

def self.optionals
  %w[
    enabled
    notify_customer
    notify_on_test
    notify_on_recurring_token_creation
    notify_on_recurring_token_cvv_failed
    notify_on_webhook_failure
    notify_on_webhook_disabled
    notify_user_on_failed_transactions
    notify_customer_on_failed_transactions
    notify_user_on_convenience_instructions
    notify_on_subscriptions
    notify_on_authorizations
    notify_on_cvv_authorizations
    notify_on_cancels
    customer_refer_link_enabled
    notify_on_convenience_expiry
    notify_on_recurring_token_creation_with_three_ds
    notify_on_chargebacks
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 326

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} enabled: #{@enabled.inspect}, notify_customer: #{@notify_customer.inspect},"\
  " notify_on_test: #{@notify_on_test.inspect}, notify_on_recurring_token_creation:"\
  " #{@notify_on_recurring_token_creation.inspect}, notify_on_recurring_token_cvv_failed:"\
  " #{@notify_on_recurring_token_cvv_failed.inspect}, notify_on_webhook_failure:"\
  " #{@notify_on_webhook_failure.inspect}, notify_on_webhook_disabled:"\
  " #{@notify_on_webhook_disabled.inspect}, notify_user_on_failed_transactions:"\
  " #{@notify_user_on_failed_transactions.inspect}, notify_customer_on_failed_transactions:"\
  " #{@notify_customer_on_failed_transactions.inspect},"\
  ' notify_user_on_convenience_instructions:'\
  " #{@notify_user_on_convenience_instructions.inspect}, notify_on_subscriptions:"\
  " #{@notify_on_subscriptions.inspect}, notify_on_authorizations:"\
  " #{@notify_on_authorizations.inspect}, notify_on_cvv_authorizations:"\
  " #{@notify_on_cvv_authorizations.inspect}, notify_on_cancels:"\
  " #{@notify_on_cancels.inspect}, customer_refer_link_enabled:"\
  " #{@customer_refer_link_enabled.inspect}, notify_on_convenience_expiry:"\
  " #{@notify_on_convenience_expiry.inspect},"\
  ' notify_on_recurring_token_creation_with_three_ds:'\
  " #{@notify_on_recurring_token_creation_with_three_ds.inspect}, notify_on_chargebacks:"\
  " #{@notify_on_chargebacks.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/univapay_client_sdk/models/merchant_webhook_user_transactions_configuration.rb', line 305

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} enabled: #{@enabled}, notify_customer: #{@notify_customer}, notify_on_test:"\
  " #{@notify_on_test}, notify_on_recurring_token_creation:"\
  " #{@notify_on_recurring_token_creation}, notify_on_recurring_token_cvv_failed:"\
  " #{@notify_on_recurring_token_cvv_failed}, notify_on_webhook_failure:"\
  " #{@notify_on_webhook_failure}, notify_on_webhook_disabled: #{@notify_on_webhook_disabled},"\
  " notify_user_on_failed_transactions: #{@notify_user_on_failed_transactions},"\
  " notify_customer_on_failed_transactions: #{@notify_customer_on_failed_transactions},"\
  " notify_user_on_convenience_instructions: #{@notify_user_on_convenience_instructions},"\
  " notify_on_subscriptions: #{@notify_on_subscriptions}, notify_on_authorizations:"\
  " #{@notify_on_authorizations}, notify_on_cvv_authorizations:"\
  " #{@notify_on_cvv_authorizations}, notify_on_cancels: #{@notify_on_cancels},"\
  " customer_refer_link_enabled: #{@customer_refer_link_enabled},"\
  " notify_on_convenience_expiry: #{@notify_on_convenience_expiry},"\
  ' notify_on_recurring_token_creation_with_three_ds:'\
  " #{@notify_on_recurring_token_creation_with_three_ds}, notify_on_chargebacks:"\
  " #{@notify_on_chargebacks}, additional_properties: #{@additional_properties}>"
end