Class: CityPayApiClient::PaylinkConfig
- Inherits:
-
Object
- Object
- CityPayApiClient::PaylinkConfig
- Defined in:
- lib/citypay_api_client/models/paylink_config.rb
Instance Attribute Summary collapse
-
#acs_mode ⇒ Object
Specifies the approach to be adopted by the Paylink form when displaying a 3-D Secure challenge window.
-
#custom_params ⇒ Object
Returns the value of attribute custom_params.
-
#descriptor ⇒ Object
Directly specify the merchant descriptor used for the transaction to be displayed on the payment page.
-
#expire_in ⇒ Object
Specifies a period of time in seconds after which the token cannot be used.
-
#field_guard ⇒ Object
Returns the value of attribute field_guard.
-
#lock_params ⇒ Object
Returns the value of attribute lock_params.
-
#merch_logo ⇒ Object
A URL of a logo to include in the form.
-
#merch_terms ⇒ Object
A URL of the merchant terms and conditions for payment.
-
#options ⇒ Object
Returns the value of attribute options.
-
#part_payments ⇒ Object
Returns the value of attribute part_payments.
-
#pass_through_data ⇒ Object
Returns the value of attribute pass_through_data.
-
#pass_through_headers ⇒ Object
Returns the value of attribute pass_through_headers.
-
#postback ⇒ Object
Specifies a URL to use for a call back when the payment is completed.
-
#postback_password ⇒ Object
A password to be added to the postback for HTTP Basic Authentication.
-
#postback_policy ⇒ Object
The policy setting for the postback see Postback Handling.
-
#postback_username ⇒ Object
A username to be added to the postback for HTTP Basic Authentication.
-
#redirect_delay ⇒ Object
A value which can delay the redirection in seconds.
-
#redirect_failure ⇒ Object
A URL which the browser is redirected to on non-completion of a transaction.
-
#redirect_success ⇒ Object
A URL which the browser is redirected to on authorisation of a transaction.
-
#renderer ⇒ Object
The Paylink renderer engine to use.
-
#return_params ⇒ Object
If a value of true is specified, any redirection will include the transaction result in parameters.
-
#ui ⇒ Object
Returns the value of attribute ui.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PaylinkConfig
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ PaylinkConfig
Initializes the object
144 145 146 147 148 149 150 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 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 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 144 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `CityPayApiClient::PaylinkConfig` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `CityPayApiClient::PaylinkConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'acs_mode') self.acs_mode = attributes[:'acs_mode'] end if attributes.key?(:'custom_params') if (value = attributes[:'custom_params']).is_a?(Array) self.custom_params = value end end if attributes.key?(:'descriptor') self.descriptor = attributes[:'descriptor'] end if attributes.key?(:'expire_in') self.expire_in = attributes[:'expire_in'] end if attributes.key?(:'field_guard') if (value = attributes[:'field_guard']).is_a?(Array) self.field_guard = value end end if attributes.key?(:'lock_params') if (value = attributes[:'lock_params']).is_a?(Array) self.lock_params = value end end if attributes.key?(:'merch_logo') self.merch_logo = attributes[:'merch_logo'] end if attributes.key?(:'merch_terms') self.merch_terms = attributes[:'merch_terms'] end if attributes.key?(:'options') if (value = attributes[:'options']).is_a?(Array) self. = value end end if attributes.key?(:'part_payments') self.part_payments = attributes[:'part_payments'] end if attributes.key?(:'pass_through_data') if (value = attributes[:'pass_through_data']).is_a?(Hash) self.pass_through_data = value end end if attributes.key?(:'pass_through_headers') if (value = attributes[:'pass_through_headers']).is_a?(Hash) self.pass_through_headers = value end end if attributes.key?(:'postback') self.postback = attributes[:'postback'] end if attributes.key?(:'postback_password') self.postback_password = attributes[:'postback_password'] end if attributes.key?(:'postback_policy') self.postback_policy = attributes[:'postback_policy'] end if attributes.key?(:'postback_username') self.postback_username = attributes[:'postback_username'] end if attributes.key?(:'redirect_delay') self.redirect_delay = attributes[:'redirect_delay'] end if attributes.key?(:'redirect_failure') self.redirect_failure = attributes[:'redirect_failure'] end if attributes.key?(:'redirect_success') self.redirect_success = attributes[:'redirect_success'] end if attributes.key?(:'renderer') self.renderer = attributes[:'renderer'] end if attributes.key?(:'return_params') self.return_params = attributes[:'return_params'] end if attributes.key?(:'ui') self.ui = attributes[:'ui'] end end |
Instance Attribute Details
#acs_mode ⇒ Object
Specifies the approach to be adopted by the Paylink form when displaying a 3-D Secure challenge window. The values may be iframe: shows the 3-D Secure ACS in an iframe dialog, neatly embedding it in Paylink. This provides a more seamless flow for the cardholder who is able to validate and authenticate their card using a dialog provided by their card issuer. inline: an inline mode transfers the full browser window to the authentication server, allowing the payment cardholder to see their payment card issuer’s URL and the certificate status in the browser. If you request an iframe mode and the browser width is deemed as being small (< 768px) then an inline mode will be enforced. This is to ensure that mobile users have an improved user experience.
18 19 20 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 18 def acs_mode @acs_mode end |
#custom_params ⇒ Object
Returns the value of attribute custom_params.
20 21 22 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 20 def custom_params @custom_params end |
#descriptor ⇒ Object
Directly specify the merchant descriptor used for the transaction to be displayed on the payment page.
23 24 25 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 23 def descriptor @descriptor end |
#expire_in ⇒ Object
Specifies a period of time in seconds after which the token cannot be used. A value of 0 defines that the token will never expire. The API will convert an expiry time based on a string value. For instance: s - Time in seconds, for example 90s. m - Time in minutes, for example 20m. h - Time in hours, for example 4h. w - Time in weeks, for example 4w. M - Time in months, for example 6M. y - Time in years, for example 1y. Defaults to 30 minutes.
26 27 28 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 26 def expire_in @expire_in end |
#field_guard ⇒ Object
Returns the value of attribute field_guard.
28 29 30 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 28 def field_guard @field_guard end |
#lock_params ⇒ Object
Returns the value of attribute lock_params.
30 31 32 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 30 def lock_params @lock_params end |
#merch_logo ⇒ Object
A URL of a logo to include in the form. The URL should be delivered using HTTPS.
33 34 35 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 33 def merch_logo @merch_logo end |
#merch_terms ⇒ Object
A URL of the merchant terms and conditions for payment. If a value is supplied, a checkbox will be required to be completed to confirm that the cardholder agrees to these conditions before payment. A modal dialogue is displayed with the content of the conditions displayed.
36 37 38 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 36 def merch_terms @merch_terms end |
#options ⇒ Object
Returns the value of attribute options.
38 39 40 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 38 def @options end |
#part_payments ⇒ Object
Returns the value of attribute part_payments.
40 41 42 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 40 def part_payments @part_payments end |
#pass_through_data ⇒ Object
Returns the value of attribute pass_through_data.
42 43 44 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 42 def pass_through_data @pass_through_data end |
#pass_through_headers ⇒ Object
Returns the value of attribute pass_through_headers.
44 45 46 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 44 def pass_through_headers @pass_through_headers end |
#postback ⇒ Object
Specifies a URL to use for a call back when the payment is completed. see Postback Handling }.
47 48 49 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 47 def postback @postback end |
#postback_password ⇒ Object
A password to be added to the postback for HTTP Basic Authentication.
50 51 52 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 50 def postback_password @postback_password end |
#postback_policy ⇒ Object
The policy setting for the postback see Postback Handling.
53 54 55 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 53 def postback_policy @postback_policy end |
#postback_username ⇒ Object
A username to be added to the postback for HTTP Basic Authentication.
56 57 58 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 56 def postback_username @postback_username end |
#redirect_delay ⇒ Object
A value which can delay the redirection in seconds. A value of 0 will redirect immediately.
59 60 61 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 59 def redirect_delay @redirect_delay end |
#redirect_failure ⇒ Object
A URL which the browser is redirected to on non-completion of a transaction.
62 63 64 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 62 def redirect_failure @redirect_failure end |
#redirect_success ⇒ Object
A URL which the browser is redirected to on authorisation of a transaction.
65 66 67 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 65 def redirect_success @redirect_success end |
#renderer ⇒ Object
The Paylink renderer engine to use.
68 69 70 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 68 def renderer @renderer end |
#return_params ⇒ Object
If a value of true is specified, any redirection will include the transaction result in parameters. It is recommended to use the postback integration rather than redirection parameters.
71 72 73 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 71 def return_params @return_params end |
#ui ⇒ Object
Returns the value of attribute ui.
73 74 75 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 73 def ui @ui end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 341 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = CityPayApiClient.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
104 105 106 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 104 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 76 def self.attribute_map { :'acs_mode' => :'acs_mode', :'custom_params' => :'custom_params', :'descriptor' => :'descriptor', :'expire_in' => :'expire_in', :'field_guard' => :'field_guard', :'lock_params' => :'lock_params', :'merch_logo' => :'merch_logo', :'merch_terms' => :'merch_terms', :'options' => :'options', :'part_payments' => :'part_payments', :'pass_through_data' => :'pass_through_data', :'pass_through_headers' => :'pass_through_headers', :'postback' => :'postback', :'postback_password' => :'postback_password', :'postback_policy' => :'postback_policy', :'postback_username' => :'postback_username', :'redirect_delay' => :'redirect_delay', :'redirect_failure' => :'redirect_failure', :'redirect_success' => :'redirect_success', :'renderer' => :'renderer', :'return_params' => :'return_params', :'ui' => :'ui' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 317 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
137 138 139 140 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 137 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 109 def self.openapi_types { :'acs_mode' => :'String', :'custom_params' => :'Array<PaylinkCustomParam>', :'descriptor' => :'String', :'expire_in' => :'String', :'field_guard' => :'Array<PaylinkFieldGuardModel>', :'lock_params' => :'Array<String>', :'merch_logo' => :'String', :'merch_terms' => :'String', :'options' => :'Array<String>', :'part_payments' => :'PaylinkPartPayments', :'pass_through_data' => :'Hash<String, String>', :'pass_through_headers' => :'Hash<String, String>', :'postback' => :'String', :'postback_password' => :'String', :'postback_policy' => :'String', :'postback_username' => :'String', :'redirect_delay' => :'Integer', :'redirect_failure' => :'String', :'redirect_success' => :'String', :'renderer' => :'String', :'return_params' => :'Boolean', :'ui' => :'PaylinkUI' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 275 def ==(o) return true if self.equal?(o) self.class == o.class && acs_mode == o.acs_mode && custom_params == o.custom_params && descriptor == o.descriptor && expire_in == o.expire_in && field_guard == o.field_guard && lock_params == o.lock_params && merch_logo == o.merch_logo && merch_terms == o.merch_terms && == o. && part_payments == o.part_payments && pass_through_data == o.pass_through_data && pass_through_headers == o.pass_through_headers && postback == o.postback && postback_password == o.postback_password && postback_policy == o.postback_policy && postback_username == o.postback_username && redirect_delay == o.redirect_delay && redirect_failure == o.redirect_failure && redirect_success == o.redirect_success && renderer == o.renderer && return_params == o.return_params && ui == o.ui end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 412 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
304 305 306 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 304 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
310 311 312 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 310 def hash [acs_mode, custom_params, descriptor, expire_in, field_guard, lock_params, merch_logo, merch_terms, , part_payments, pass_through_data, pass_through_headers, postback, postback_password, postback_policy, postback_username, redirect_delay, redirect_failure, redirect_success, renderer, return_params, ui].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
260 261 262 263 264 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 260 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
388 389 390 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 388 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 394 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
382 383 384 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 382 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
268 269 270 271 |
# File 'lib/citypay_api_client/models/paylink_config.rb', line 268 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |