Class: UnivapayClientSdk::MerchantWebhookSecurityConfiguration
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::MerchantWebhookSecurityConfiguration
- Defined in:
- lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb
Overview
Merchant-level fraud and refund safety settings.
Instance Attribute Summary collapse
-
#card_charge_cooldown ⇒ String
ISO-8601 duration between card charge attempts.
-
#confirmation_required ⇒ TrueClass | FalseClass
Requires confirmation before protected refund actions proceed.
-
#idempotent_card_charge_cooldown ⇒ String
ISO-8601 duration for reusing an idempotent card charge key.
-
#idempotent_subscription_cooldown ⇒ String
ISO-8601 duration for reusing an idempotent subscription key.
-
#inspect_suspicious_login_after ⇒ String
Look-back period used to review suspicious login activity.
-
#limit_charge_by_card_configuration ⇒ MerchantWebhookLimitChargeByCardConfiguration
Per-card velocity limit configuration.
-
#limit_refund_by_sales ⇒ MerchantWebhookLimitRefundBySalesConfiguration
Refund-limiting configuration based on sales history.
-
#min_refund_threshold ⇒ Integer
Minimum refund amount, in minor units, subject to confirmation checks.
-
#refund_percent_limit ⇒ Float
Maximum refund-to-sales percentage allowed before restriction.
-
#restrict_ip_after_failed_charge ⇒ RestrictIpAfterFailedChargeConfig
IP restriction policy applied after repeated failed charges.
-
#subscription_cooldown ⇒ String
ISO-8601 duration between subscription charge attempts.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(card_charge_cooldown: SKIP, subscription_cooldown: SKIP, idempotent_card_charge_cooldown: SKIP, idempotent_subscription_cooldown: SKIP, restrict_ip_after_failed_charge: SKIP, inspect_suspicious_login_after: SKIP, refund_percent_limit: SKIP, limit_charge_by_card_configuration: SKIP, confirmation_required: SKIP, min_refund_threshold: SKIP, limit_refund_by_sales: SKIP, additional_properties: nil) ⇒ MerchantWebhookSecurityConfiguration
constructor
A new instance of MerchantWebhookSecurityConfiguration.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(card_charge_cooldown: SKIP, subscription_cooldown: SKIP, idempotent_card_charge_cooldown: SKIP, idempotent_subscription_cooldown: SKIP, restrict_ip_after_failed_charge: SKIP, inspect_suspicious_login_after: SKIP, refund_percent_limit: SKIP, limit_charge_by_card_configuration: SKIP, confirmation_required: SKIP, min_refund_threshold: SKIP, limit_refund_by_sales: SKIP, additional_properties: nil) ⇒ MerchantWebhookSecurityConfiguration
Returns a new instance of MerchantWebhookSecurityConfiguration.
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 146 147 148 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 109 def initialize(card_charge_cooldown: SKIP, subscription_cooldown: SKIP, idempotent_card_charge_cooldown: SKIP, idempotent_subscription_cooldown: SKIP, restrict_ip_after_failed_charge: SKIP, inspect_suspicious_login_after: SKIP, refund_percent_limit: SKIP, limit_charge_by_card_configuration: SKIP, confirmation_required: SKIP, min_refund_threshold: SKIP, limit_refund_by_sales: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @card_charge_cooldown = card_charge_cooldown unless card_charge_cooldown == SKIP @subscription_cooldown = subscription_cooldown unless subscription_cooldown == SKIP unless idempotent_card_charge_cooldown == SKIP @idempotent_card_charge_cooldown = idempotent_card_charge_cooldown end unless idempotent_subscription_cooldown == SKIP @idempotent_subscription_cooldown = idempotent_subscription_cooldown end unless restrict_ip_after_failed_charge == SKIP @restrict_ip_after_failed_charge = restrict_ip_after_failed_charge end unless inspect_suspicious_login_after == SKIP @inspect_suspicious_login_after = inspect_suspicious_login_after end @refund_percent_limit = refund_percent_limit unless refund_percent_limit == SKIP unless limit_charge_by_card_configuration == SKIP @limit_charge_by_card_configuration = limit_charge_by_card_configuration end @confirmation_required = confirmation_required unless confirmation_required == SKIP @min_refund_threshold = min_refund_threshold unless min_refund_threshold == SKIP @limit_refund_by_sales = limit_refund_by_sales unless limit_refund_by_sales == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#card_charge_cooldown ⇒ String
ISO-8601 duration between card charge attempts.
14 15 16 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 14 def card_charge_cooldown @card_charge_cooldown end |
#confirmation_required ⇒ TrueClass | FalseClass
Requires confirmation before protected refund actions proceed.
46 47 48 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 46 def confirmation_required @confirmation_required end |
#idempotent_card_charge_cooldown ⇒ String
ISO-8601 duration for reusing an idempotent card charge key.
22 23 24 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 22 def idempotent_card_charge_cooldown @idempotent_card_charge_cooldown end |
#idempotent_subscription_cooldown ⇒ String
ISO-8601 duration for reusing an idempotent subscription key.
26 27 28 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 26 def idempotent_subscription_cooldown @idempotent_subscription_cooldown end |
#inspect_suspicious_login_after ⇒ String
Look-back period used to review suspicious login activity.
34 35 36 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 34 def inspect_suspicious_login_after @inspect_suspicious_login_after end |
#limit_charge_by_card_configuration ⇒ MerchantWebhookLimitChargeByCardConfiguration
Per-card velocity limit configuration.
42 43 44 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 42 def limit_charge_by_card_configuration @limit_charge_by_card_configuration end |
#limit_refund_by_sales ⇒ MerchantWebhookLimitRefundBySalesConfiguration
Refund-limiting configuration based on sales history.
54 55 56 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 54 def limit_refund_by_sales @limit_refund_by_sales end |
#min_refund_threshold ⇒ Integer
Minimum refund amount, in minor units, subject to confirmation checks.
50 51 52 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 50 def min_refund_threshold @min_refund_threshold end |
#refund_percent_limit ⇒ Float
Maximum refund-to-sales percentage allowed before restriction.
38 39 40 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 38 def refund_percent_limit @refund_percent_limit end |
#restrict_ip_after_failed_charge ⇒ RestrictIpAfterFailedChargeConfig
IP restriction policy applied after repeated failed charges.
30 31 32 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 30 def restrict_ip_after_failed_charge @restrict_ip_after_failed_charge end |
#subscription_cooldown ⇒ String
ISO-8601 duration between subscription charge attempts.
18 19 20 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 18 def subscription_cooldown @subscription_cooldown end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
151 152 153 154 155 156 157 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 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 151 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. card_charge_cooldown = hash.key?('card_charge_cooldown') ? hash['card_charge_cooldown'] : SKIP subscription_cooldown = hash.key?('subscription_cooldown') ? hash['subscription_cooldown'] : SKIP idempotent_card_charge_cooldown = hash.key?('idempotent_card_charge_cooldown') ? hash['idempotent_card_charge_cooldown'] : SKIP idempotent_subscription_cooldown = hash.key?('idempotent_subscription_cooldown') ? hash['idempotent_subscription_cooldown'] : SKIP if hash['restrict_ip_after_failed_charge'] restrict_ip_after_failed_charge = RestrictIpAfterFailedChargeConfig.from_hash(hash['restrict_ip_after_failed_charge']) end inspect_suspicious_login_after = hash.key?('inspect_suspicious_login_after') ? hash['inspect_suspicious_login_after'] : SKIP refund_percent_limit = hash.key?('refund_percent_limit') ? hash['refund_percent_limit'] : SKIP if hash['limit_charge_by_card_configuration'] limit_charge_by_card_configuration = MerchantWebhookLimitChargeByCardConfiguration.from_hash(hash['limit_charge_by_card_configuration']) end confirmation_required = hash.key?('confirmation_required') ? hash['confirmation_required'] : SKIP min_refund_threshold = hash.key?('min_refund_threshold') ? hash['min_refund_threshold'] : SKIP if hash['limit_refund_by_sales'] limit_refund_by_sales = MerchantWebhookLimitRefundBySalesConfiguration.from_hash(hash['limit_refund_by_sales']) end # 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. MerchantWebhookSecurityConfiguration.new(card_charge_cooldown: card_charge_cooldown, subscription_cooldown: subscription_cooldown, idempotent_card_charge_cooldown: idempotent_card_charge_cooldown, idempotent_subscription_cooldown: idempotent_subscription_cooldown, restrict_ip_after_failed_charge: restrict_ip_after_failed_charge, inspect_suspicious_login_after: inspect_suspicious_login_after, refund_percent_limit: refund_percent_limit, limit_charge_by_card_configuration: limit_charge_by_card_configuration, confirmation_required: confirmation_required, min_refund_threshold: min_refund_threshold, limit_refund_by_sales: limit_refund_by_sales, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 57 def self.names @_hash = {} if @_hash.nil? @_hash['card_charge_cooldown'] = 'card_charge_cooldown' @_hash['subscription_cooldown'] = 'subscription_cooldown' @_hash['idempotent_card_charge_cooldown'] = 'idempotent_card_charge_cooldown' @_hash['idempotent_subscription_cooldown'] = 'idempotent_subscription_cooldown' @_hash['restrict_ip_after_failed_charge'] = 'restrict_ip_after_failed_charge' @_hash['inspect_suspicious_login_after'] = 'inspect_suspicious_login_after' @_hash['refund_percent_limit'] = 'refund_percent_limit' @_hash['limit_charge_by_card_configuration'] = 'limit_charge_by_card_configuration' @_hash['confirmation_required'] = 'confirmation_required' @_hash['min_refund_threshold'] = 'min_refund_threshold' @_hash['limit_refund_by_sales'] = 'limit_refund_by_sales' @_hash end |
.nullables ⇒ Object
An array for nullable fields
96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 96 def self.nullables %w[ card_charge_cooldown subscription_cooldown idempotent_card_charge_cooldown idempotent_subscription_cooldown inspect_suspicious_login_after refund_percent_limit confirmation_required min_refund_threshold ] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 79 def self.optionals %w[ card_charge_cooldown subscription_cooldown idempotent_card_charge_cooldown idempotent_subscription_cooldown restrict_ip_after_failed_charge inspect_suspicious_login_after refund_percent_limit limit_charge_by_card_configuration confirmation_required min_refund_threshold limit_refund_by_sales ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 219 def inspect class_name = self.class.name.split('::').last "<#{class_name} card_charge_cooldown: #{@card_charge_cooldown.inspect},"\ " subscription_cooldown: #{@subscription_cooldown.inspect}, idempotent_card_charge_cooldown:"\ " #{@idempotent_card_charge_cooldown.inspect}, idempotent_subscription_cooldown:"\ " #{@idempotent_subscription_cooldown.inspect}, restrict_ip_after_failed_charge:"\ " #{@restrict_ip_after_failed_charge.inspect}, inspect_suspicious_login_after:"\ " #{@inspect_suspicious_login_after.inspect}, refund_percent_limit:"\ " #{@refund_percent_limit.inspect}, limit_charge_by_card_configuration:"\ " #{@limit_charge_by_card_configuration.inspect}, confirmation_required:"\ " #{@confirmation_required.inspect}, min_refund_threshold: #{@min_refund_threshold.inspect},"\ " limit_refund_by_sales: #{@limit_refund_by_sales.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/univapay_client_sdk/models/merchant_webhook_security_configuration.rb', line 204 def to_s class_name = self.class.name.split('::').last "<#{class_name} card_charge_cooldown: #{@card_charge_cooldown}, subscription_cooldown:"\ " #{@subscription_cooldown}, idempotent_card_charge_cooldown:"\ " #{@idempotent_card_charge_cooldown}, idempotent_subscription_cooldown:"\ " #{@idempotent_subscription_cooldown}, restrict_ip_after_failed_charge:"\ " #{@restrict_ip_after_failed_charge}, inspect_suspicious_login_after:"\ " #{@inspect_suspicious_login_after}, refund_percent_limit: #{@refund_percent_limit},"\ " limit_charge_by_card_configuration: #{@limit_charge_by_card_configuration},"\ " confirmation_required: #{@confirmation_required}, min_refund_threshold:"\ " #{@min_refund_threshold}, limit_refund_by_sales: #{@limit_refund_by_sales},"\ " additional_properties: #{@additional_properties}>" end |