Class: VisaAcceptanceMergedSpec::DeviceInformation5
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::DeviceInformation5
- Defined in:
- lib/visa_acceptance_merged_spec/models/device_information5.rb
Overview
DeviceInformation5 Model.
Instance Attribute Summary collapse
-
#http_accept_browser_value ⇒ String
Value of the Accept header sent by the customer’s web browser.
-
#ip_address ⇒ String
IP address of the customer.
-
#user_agent_browser_value ⇒ String
Value of the User-Agent header sent by the customer’s web browser.
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(http_accept_browser_value: SKIP, ip_address: SKIP, user_agent_browser_value: SKIP, additional_properties: nil) ⇒ DeviceInformation5
constructor
A new instance of DeviceInformation5.
-
#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(http_accept_browser_value: SKIP, ip_address: SKIP, user_agent_browser_value: SKIP, additional_properties: nil) ⇒ DeviceInformation5
Returns a new instance of DeviceInformation5.
54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 54 def initialize(http_accept_browser_value: SKIP, ip_address: SKIP, user_agent_browser_value: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless http_accept_browser_value == SKIP @http_accept_browser_value = http_accept_browser_value end @ip_address = ip_address unless ip_address == SKIP @user_agent_browser_value = user_agent_browser_value unless user_agent_browser_value == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#http_accept_browser_value ⇒ String
Value of the Accept header sent by the customer’s web browser. Note If the customer’s browser provides a value, you must include it in your request.
16 17 18 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 16 def http_accept_browser_value @http_accept_browser_value end |
#ip_address ⇒ String
IP address of the customer.
Used by
Authorization, Capture, and Credit Optional field.
23 24 25 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 23 def ip_address @ip_address end |
#user_agent_browser_value ⇒ String
Value of the User-Agent header sent by the customer’s web browser. Note If the customer’s browser provides a value, you must include it in your request.
29 30 31 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 29 def user_agent_browser_value @user_agent_browser_value end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. http_accept_browser_value = hash.key?('httpAcceptBrowserValue') ? hash['httpAcceptBrowserValue'] : SKIP ip_address = hash.key?('ipAddress') ? hash['ipAddress'] : SKIP user_agent_browser_value = hash.key?('userAgentBrowserValue') ? hash['userAgentBrowserValue'] : 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. DeviceInformation5.new(http_accept_browser_value: http_accept_browser_value, ip_address: ip_address, user_agent_browser_value: user_agent_browser_value, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 38 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['http_accept_browser_value'] = 'httpAcceptBrowserValue' @_hash['ip_address'] = 'ipAddress' @_hash['user_agent_browser_value'] = 'userAgentBrowserValue' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 46 47 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 41 def self.optionals %w[ http_accept_browser_value ip_address user_agent_browser_value ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
102 103 104 105 106 107 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 102 def inspect class_name = self.class.name.split('::').last "<#{class_name} http_accept_browser_value: #{@http_accept_browser_value.inspect},"\ " ip_address: #{@ip_address.inspect}, user_agent_browser_value:"\ " #{@user_agent_browser_value.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
94 95 96 97 98 99 |
# File 'lib/visa_acceptance_merged_spec/models/device_information5.rb', line 94 def to_s class_name = self.class.name.split('::').last "<#{class_name} http_accept_browser_value: #{@http_accept_browser_value}, ip_address:"\ " #{@ip_address}, user_agent_browser_value: #{@user_agent_browser_value},"\ " additional_properties: #{@additional_properties}>" end |