Class: UnivapayClientSdk::MerchantWebhookBankTransferConfiguration

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

Overview

Bank transfer payment 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, match_amount: SKIP, expiration: SKIP, virtual_bank_accounts_threshold: SKIP, virtual_bank_accounts_fetch_count: SKIP, default_extension_period: SKIP, maximum_extension_period: SKIP, automatic_extension_enabled: SKIP, charge_request_notification_enabled: SKIP, charge_request_canceled_notification_enabled: SKIP, charge_expired_notification_enabled: SKIP, deposit_received_notification_enabled: SKIP, deposit_insufficient_notification_enabled: SKIP, deposit_exceeded_notification_enabled: SKIP, extension_notification_enabled: SKIP, remind_notification_period: SKIP, remind_notification_enabled: SKIP, additional_properties: nil) ⇒ MerchantWebhookBankTransferConfiguration

Returns a new instance of MerchantWebhookBankTransferConfiguration.



158
159
160
161
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
# File 'lib/univapay_client_sdk/models/merchant_webhook_bank_transfer_configuration.rb', line 158

def initialize(enabled: SKIP, match_amount: SKIP, expiration: SKIP,
               virtual_bank_accounts_threshold: SKIP,
               virtual_bank_accounts_fetch_count: SKIP,
               default_extension_period: SKIP,
               maximum_extension_period: SKIP,
               automatic_extension_enabled: SKIP,
               charge_request_notification_enabled: SKIP,
               charge_request_canceled_notification_enabled: SKIP,
               charge_expired_notification_enabled: SKIP,
               deposit_received_notification_enabled: SKIP,
               deposit_insufficient_notification_enabled: SKIP,
               deposit_exceeded_notification_enabled: SKIP,
               extension_notification_enabled: SKIP,
               remind_notification_period: SKIP,
               remind_notification_enabled: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @enabled = enabled unless enabled == SKIP
  @match_amount = match_amount unless match_amount == SKIP
  @expiration = expiration unless expiration == SKIP
  unless virtual_bank_accounts_threshold == SKIP
    @virtual_bank_accounts_threshold =
      virtual_bank_accounts_threshold
  end
  unless virtual_bank_accounts_fetch_count == SKIP
    @virtual_bank_accounts_fetch_count =
      virtual_bank_accounts_fetch_count
  end
  @default_extension_period = default_extension_period unless default_extension_period == SKIP
  @maximum_extension_period = maximum_extension_period unless maximum_extension_period == SKIP
  unless automatic_extension_enabled == SKIP
    @automatic_extension_enabled =
      automatic_extension_enabled
  end
  unless charge_request_notification_enabled == SKIP
    @charge_request_notification_enabled =
      charge_request_notification_enabled
  end
  unless charge_request_canceled_notification_enabled == SKIP
    @charge_request_canceled_notification_enabled =
      charge_request_canceled_notification_enabled
  end
  unless charge_expired_notification_enabled == SKIP
    @charge_expired_notification_enabled =
      charge_expired_notification_enabled
  end
  unless deposit_received_notification_enabled == SKIP
    @deposit_received_notification_enabled =
      deposit_received_notification_enabled
  end
  unless deposit_insufficient_notification_enabled == SKIP
    @deposit_insufficient_notification_enabled =
      deposit_insufficient_notification_enabled
  end
  unless deposit_exceeded_notification_enabled == SKIP
    @deposit_exceeded_notification_enabled =
      deposit_exceeded_notification_enabled
  end
  unless extension_notification_enabled == SKIP
    @extension_notification_enabled =
      extension_notification_enabled
  end
  unless remind_notification_period == SKIP
    @remind_notification_period =
      remind_notification_period
  end
  unless remind_notification_enabled == SKIP
    @remind_notification_enabled =
      remind_notification_enabled
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#automatic_extension_enabledTrueClass | FalseClass

Automatically extends eligible bank transfer charges.

Returns:

  • (TrueClass | FalseClass)


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

def automatic_extension_enabled
  @automatic_extension_enabled
end

#charge_expired_notification_enabledTrueClass | FalseClass

Sends notifications when a bank transfer charge expires.

Returns:

  • (TrueClass | FalseClass)


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

def charge_expired_notification_enabled
  @charge_expired_notification_enabled
end

#charge_request_canceled_notification_enabledTrueClass | FalseClass

Sends notifications when a bank transfer charge is canceled.

Returns:

  • (TrueClass | FalseClass)


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

def charge_request_canceled_notification_enabled
  @charge_request_canceled_notification_enabled
end

#charge_request_notification_enabledTrueClass | FalseClass

Sends notifications when a bank transfer charge is created.

Returns:

  • (TrueClass | FalseClass)


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

def charge_request_notification_enabled
  @charge_request_notification_enabled
end

#default_extension_periodString

Default ISO-8601 extension period applied to eligible charges.

Returns:

  • (String)


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

def default_extension_period
  @default_extension_period
end

#deposit_exceeded_notification_enabledTrueClass | FalseClass

Sends notifications when a deposit exceeds the expected amount.

Returns:

  • (TrueClass | FalseClass)


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

def deposit_exceeded_notification_enabled
  @deposit_exceeded_notification_enabled
end

#deposit_insufficient_notification_enabledTrueClass | FalseClass

Sends notifications when a deposit is below the expected amount.

Returns:

  • (TrueClass | FalseClass)


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

def deposit_insufficient_notification_enabled
  @deposit_insufficient_notification_enabled
end

#deposit_received_notification_enabledTrueClass | FalseClass

Sends notifications when a deposit is received.

Returns:

  • (TrueClass | FalseClass)


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

def deposit_received_notification_enabled
  @deposit_received_notification_enabled
end

#enabledTrueClass | FalseClass

Enables bank transfer payments.

Returns:

  • (TrueClass | FalseClass)


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

def enabled
  @enabled
end

#expirationString

ISO-8601 duration before the charge expires.

Returns:

  • (String)


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

def expiration
  @expiration
end

#extension_notification_enabledTrueClass | FalseClass

Sends notifications when a bank transfer charge is extended.

Returns:

  • (TrueClass | FalseClass)


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

def extension_notification_enabled
  @extension_notification_enabled
end

#match_amountTrueClass | FalseClass

Requires the received deposit amount to exactly match the charge amount.

Returns:

  • (TrueClass | FalseClass)


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

def match_amount
  @match_amount
end

#maximum_extension_periodString

Maximum ISO-8601 extension period allowed for a charge.

Returns:

  • (String)


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

def maximum_extension_period
  @maximum_extension_period
end

#remind_notification_enabledTrueClass | FalseClass

Sends reminder notifications before bank transfer expiry.

Returns:

  • (TrueClass | FalseClass)


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

def remind_notification_enabled
  @remind_notification_enabled
end

#remind_notification_periodString

ISO-8601 lead time for payment reminder notifications.

Returns:

  • (String)


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

def remind_notification_period
  @remind_notification_period
end

#virtual_bank_accounts_fetch_countInteger

Number of virtual bank accounts fetched per replenishment batch.

Returns:

  • (Integer)


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

def virtual_bank_accounts_fetch_count
  @virtual_bank_accounts_fetch_count
end

#virtual_bank_accounts_thresholdInteger

Threshold for provisioning additional virtual bank accounts.

Returns:

  • (Integer)


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

def virtual_bank_accounts_threshold
  @virtual_bank_accounts_threshold
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



234
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
# File 'lib/univapay_client_sdk/models/merchant_webhook_bank_transfer_configuration.rb', line 234

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  enabled = hash.key?('enabled') ? hash['enabled'] : SKIP
  match_amount = hash.key?('match_amount') ? hash['match_amount'] : SKIP
  expiration = hash.key?('expiration') ? hash['expiration'] : SKIP
  virtual_bank_accounts_threshold =
    hash.key?('virtual_bank_accounts_threshold') ? hash['virtual_bank_accounts_threshold'] : SKIP
  virtual_bank_accounts_fetch_count =
    hash.key?('virtual_bank_accounts_fetch_count') ? hash['virtual_bank_accounts_fetch_count'] : SKIP
  default_extension_period =
    hash.key?('default_extension_period') ? hash['default_extension_period'] : SKIP
  maximum_extension_period =
    hash.key?('maximum_extension_period') ? hash['maximum_extension_period'] : SKIP
  automatic_extension_enabled =
    hash.key?('automatic_extension_enabled') ? hash['automatic_extension_enabled'] : SKIP
  charge_request_notification_enabled =
    hash.key?('charge_request_notification_enabled') ? hash['charge_request_notification_enabled'] : SKIP
  charge_request_canceled_notification_enabled =
    hash.key?('charge_request_canceled_notification_enabled') ? hash['charge_request_canceled_notification_enabled'] : SKIP
  charge_expired_notification_enabled =
    hash.key?('charge_expired_notification_enabled') ? hash['charge_expired_notification_enabled'] : SKIP
  deposit_received_notification_enabled =
    hash.key?('deposit_received_notification_enabled') ? hash['deposit_received_notification_enabled'] : SKIP
  deposit_insufficient_notification_enabled =
    hash.key?('deposit_insufficient_notification_enabled') ? hash['deposit_insufficient_notification_enabled'] : SKIP
  deposit_exceeded_notification_enabled =
    hash.key?('deposit_exceeded_notification_enabled') ? hash['deposit_exceeded_notification_enabled'] : SKIP
  extension_notification_enabled =
    hash.key?('extension_notification_enabled') ? hash['extension_notification_enabled'] : SKIP
  remind_notification_period =
    hash.key?('remind_notification_period') ? hash['remind_notification_period'] : SKIP
  remind_notification_enabled =
    hash.key?('remind_notification_enabled') ? hash['remind_notification_enabled'] : 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.
  MerchantWebhookBankTransferConfiguration.new(enabled: enabled,
                                               match_amount: match_amount,
                                               expiration: expiration,
                                               virtual_bank_accounts_threshold: virtual_bank_accounts_threshold,
                                               virtual_bank_accounts_fetch_count: virtual_bank_accounts_fetch_count,
                                               default_extension_period: default_extension_period,
                                               maximum_extension_period: maximum_extension_period,
                                               automatic_extension_enabled: automatic_extension_enabled,
                                               charge_request_notification_enabled: charge_request_notification_enabled,
                                               charge_request_canceled_notification_enabled: charge_request_canceled_notification_enabled,
                                               charge_expired_notification_enabled: charge_expired_notification_enabled,
                                               deposit_received_notification_enabled: deposit_received_notification_enabled,
                                               deposit_insufficient_notification_enabled: deposit_insufficient_notification_enabled,
                                               deposit_exceeded_notification_enabled: deposit_exceeded_notification_enabled,
                                               extension_notification_enabled: extension_notification_enabled,
                                               remind_notification_period: remind_notification_period,
                                               remind_notification_enabled: remind_notification_enabled,
                                               additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



81
82
83
84
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
# File 'lib/univapay_client_sdk/models/merchant_webhook_bank_transfer_configuration.rb', line 81

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['enabled'] = 'enabled'
  @_hash['match_amount'] = 'match_amount'
  @_hash['expiration'] = 'expiration'
  @_hash['virtual_bank_accounts_threshold'] =
    'virtual_bank_accounts_threshold'
  @_hash['virtual_bank_accounts_fetch_count'] =
    'virtual_bank_accounts_fetch_count'
  @_hash['default_extension_period'] = 'default_extension_period'
  @_hash['maximum_extension_period'] = 'maximum_extension_period'
  @_hash['automatic_extension_enabled'] = 'automatic_extension_enabled'
  @_hash['charge_request_notification_enabled'] =
    'charge_request_notification_enabled'
  @_hash['charge_request_canceled_notification_enabled'] =
    'charge_request_canceled_notification_enabled'
  @_hash['charge_expired_notification_enabled'] =
    'charge_expired_notification_enabled'
  @_hash['deposit_received_notification_enabled'] =
    'deposit_received_notification_enabled'
  @_hash['deposit_insufficient_notification_enabled'] =
    'deposit_insufficient_notification_enabled'
  @_hash['deposit_exceeded_notification_enabled'] =
    'deposit_exceeded_notification_enabled'
  @_hash['extension_notification_enabled'] =
    'extension_notification_enabled'
  @_hash['remind_notification_period'] = 'remind_notification_period'
  @_hash['remind_notification_enabled'] = 'remind_notification_enabled'
  @_hash
end

.nullablesObject

An array for nullable fields



136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/univapay_client_sdk/models/merchant_webhook_bank_transfer_configuration.rb', line 136

def self.nullables
  %w[
    enabled
    match_amount
    expiration
    virtual_bank_accounts_threshold
    virtual_bank_accounts_fetch_count
    default_extension_period
    maximum_extension_period
    automatic_extension_enabled
    charge_request_notification_enabled
    charge_request_canceled_notification_enabled
    charge_expired_notification_enabled
    deposit_received_notification_enabled
    deposit_insufficient_notification_enabled
    deposit_exceeded_notification_enabled
    extension_notification_enabled
    remind_notification_period
    remind_notification_enabled
  ]
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    enabled
    match_amount
    expiration
    virtual_bank_accounts_threshold
    virtual_bank_accounts_fetch_count
    default_extension_period
    maximum_extension_period
    automatic_extension_enabled
    charge_request_notification_enabled
    charge_request_canceled_notification_enabled
    charge_expired_notification_enabled
    deposit_received_notification_enabled
    deposit_insufficient_notification_enabled
    deposit_exceeded_notification_enabled
    extension_notification_enabled
    remind_notification_period
    remind_notification_enabled
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/univapay_client_sdk/models/merchant_webhook_bank_transfer_configuration.rb', line 319

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} enabled: #{@enabled.inspect}, match_amount: #{@match_amount.inspect},"\
  " expiration: #{@expiration.inspect}, virtual_bank_accounts_threshold:"\
  " #{@virtual_bank_accounts_threshold.inspect}, virtual_bank_accounts_fetch_count:"\
  " #{@virtual_bank_accounts_fetch_count.inspect}, default_extension_period:"\
  " #{@default_extension_period.inspect}, maximum_extension_period:"\
  " #{@maximum_extension_period.inspect}, automatic_extension_enabled:"\
  " #{@automatic_extension_enabled.inspect}, charge_request_notification_enabled:"\
  " #{@charge_request_notification_enabled.inspect},"\
  ' charge_request_canceled_notification_enabled:'\
  " #{@charge_request_canceled_notification_enabled.inspect},"\
  " charge_expired_notification_enabled: #{@charge_expired_notification_enabled.inspect},"\
  " deposit_received_notification_enabled: #{@deposit_received_notification_enabled.inspect},"\
  ' deposit_insufficient_notification_enabled:'\
  " #{@deposit_insufficient_notification_enabled.inspect},"\
  " deposit_exceeded_notification_enabled: #{@deposit_exceeded_notification_enabled.inspect},"\
  " extension_notification_enabled: #{@extension_notification_enabled.inspect},"\
  " remind_notification_period: #{@remind_notification_period.inspect},"\
  " remind_notification_enabled: #{@remind_notification_enabled.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/univapay_client_sdk/models/merchant_webhook_bank_transfer_configuration.rb', line 299

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} enabled: #{@enabled}, match_amount: #{@match_amount}, expiration:"\
  " #{@expiration}, virtual_bank_accounts_threshold: #{@virtual_bank_accounts_threshold},"\
  " virtual_bank_accounts_fetch_count: #{@virtual_bank_accounts_fetch_count},"\
  " default_extension_period: #{@default_extension_period}, maximum_extension_period:"\
  " #{@maximum_extension_period}, automatic_extension_enabled:"\
  " #{@automatic_extension_enabled}, charge_request_notification_enabled:"\
  " #{@charge_request_notification_enabled}, charge_request_canceled_notification_enabled:"\
  " #{@charge_request_canceled_notification_enabled}, charge_expired_notification_enabled:"\
  " #{@charge_expired_notification_enabled}, deposit_received_notification_enabled:"\
  " #{@deposit_received_notification_enabled}, deposit_insufficient_notification_enabled:"\
  " #{@deposit_insufficient_notification_enabled}, deposit_exceeded_notification_enabled:"\
  " #{@deposit_exceeded_notification_enabled}, extension_notification_enabled:"\
  " #{@extension_notification_enabled}, remind_notification_period:"\
  " #{@remind_notification_period}, remind_notification_enabled:"\
  " #{@remind_notification_enabled}, additional_properties: #{@additional_properties}>"
end