Class: PaysecureApiDocumentationLive::TrustScoreExists

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/paysecure_api_documentation_live/models/trust_score_exists.rb

Overview

TrustScoreExists Model.

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(trust_score:, deliverable:, proxy:, vpn:, tor:, active_vpn:, active_tor:, recent_abuse:, bot_status:, additional_properties: nil) ⇒ TrustScoreExists

Returns a new instance of TrustScoreExists.



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 73

def initialize(trust_score:, deliverable:, proxy:, vpn:, tor:, active_vpn:,
               active_tor:, recent_abuse:, bot_status:,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @trust_score = trust_score
  @deliverable = deliverable
  @proxy = proxy
  @vpn = vpn
  @tor = tor
  @active_vpn = active_vpn
  @active_tor = active_tor
  @recent_abuse = recent_abuse
  @bot_status = bot_status
  @additional_properties = additional_properties
end

Instance Attribute Details

#active_torString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 38

def active_tor
  @active_tor
end

#active_vpnString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 34

def active_vpn
  @active_vpn
end

#bot_statusString

TODO: Write general description for this method

Returns:

  • (String)


46
47
48
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 46

def bot_status
  @bot_status
end

#deliverableString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 18

def deliverable
  @deliverable
end

#proxyString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 22

def proxy
  @proxy
end

#recent_abuseString

TODO: Write general description for this method

Returns:

  • (String)


42
43
44
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 42

def recent_abuse
  @recent_abuse
end

#torString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 30

def tor
  @tor
end

#trust_scoreInteger

TODO: Write general description for this method

Returns:

  • (Integer)


14
15
16
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 14

def trust_score
  @trust_score
end

#vpnString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 26

def vpn
  @vpn
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 92

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  trust_score = hash.key?('trustScore') ? hash['trustScore'] : nil
  deliverable = hash.key?('deliverable') ? hash['deliverable'] : nil
  proxy = hash.key?('proxy') ? hash['proxy'] : nil
  vpn = hash.key?('vpn') ? hash['vpn'] : nil
  tor = hash.key?('tor') ? hash['tor'] : nil
  active_vpn = hash.key?('active_vpn') ? hash['active_vpn'] : nil
  active_tor = hash.key?('active_tor') ? hash['active_tor'] : nil
  recent_abuse = hash.key?('recent_abuse') ? hash['recent_abuse'] : nil
  bot_status = hash.key?('bot_status') ? hash['bot_status'] : nil

  # 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.
  TrustScoreExists.new(trust_score: trust_score,
                       deliverable: deliverable,
                       proxy: proxy,
                       vpn: vpn,
                       tor: tor,
                       active_vpn: active_vpn,
                       active_tor: active_tor,
                       recent_abuse: recent_abuse,
                       bot_status: bot_status,
                       additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 49

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['trust_score'] = 'trustScore'
  @_hash['deliverable'] = 'deliverable'
  @_hash['proxy'] = 'proxy'
  @_hash['vpn'] = 'vpn'
  @_hash['tor'] = 'tor'
  @_hash['active_vpn'] = 'active_vpn'
  @_hash['active_tor'] = 'active_tor'
  @_hash['recent_abuse'] = 'recent_abuse'
  @_hash['bot_status'] = 'bot_status'
  @_hash
end

.nullablesObject

An array for nullable fields



69
70
71
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 69

def self.nullables
  []
end

.optionalsObject

An array for optional fields



64
65
66
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 64

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



136
137
138
139
140
141
142
143
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 136

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} trust_score: #{@trust_score.inspect}, deliverable: #{@deliverable.inspect},"\
  " proxy: #{@proxy.inspect}, vpn: #{@vpn.inspect}, tor: #{@tor.inspect}, active_vpn:"\
  " #{@active_vpn.inspect}, active_tor: #{@active_tor.inspect}, recent_abuse:"\
  " #{@recent_abuse.inspect}, bot_status: #{@bot_status.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



127
128
129
130
131
132
133
# File 'lib/paysecure_api_documentation_live/models/trust_score_exists.rb', line 127

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} trust_score: #{@trust_score}, deliverable: #{@deliverable}, proxy:"\
  " #{@proxy}, vpn: #{@vpn}, tor: #{@tor}, active_vpn: #{@active_vpn}, active_tor:"\
  " #{@active_tor}, recent_abuse: #{@recent_abuse}, bot_status: #{@bot_status},"\
  " additional_properties: #{@additional_properties}>"
end