Class: PaysecureApiDocumentationLive::StatusHistory8

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

Overview

StatusHistory8 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(type:, status:, timestamp:, updated_by:, paid_reason:, additional_properties: nil) ⇒ StatusHistory8

Returns a new instance of StatusHistory8.



56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/paysecure_api_documentation_live/models/status_history8.rb', line 56

def initialize(type:, status:, timestamp:, updated_by:, paid_reason:,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @type = type
  @status = status
  @timestamp = timestamp
  @updated_by = updated_by
  @paid_reason = paid_reason
  @additional_properties = additional_properties
end

Instance Attribute Details

TODO: Write general description for this method

Returns:

  • (String)


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

def paid_reason
  @paid_reason
end

#statusString

TODO: Write general description for this method

Returns:

  • (String)


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

def status
  @status
end

#timestampInteger

TODO: Write general description for this method

Returns:

  • (Integer)


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

def timestamp
  @timestamp
end

#typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def type
  @type
end

#updated_byString

TODO: Write general description for this method

Returns:

  • (String)


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

def updated_by
  @updated_by
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/paysecure_api_documentation_live/models/status_history8.rb', line 70

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  type = hash.key?('_type') ? hash['_type'] : nil
  status = hash.key?('status') ? hash['status'] : nil
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : nil
  updated_by = hash.key?('updatedBy') ? hash['updatedBy'] : nil
  paid_reason = hash.key?('paidReason') ? hash['paidReason'] : 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.
  StatusHistory8.new(type: type,
                     status: status,
                     timestamp: timestamp,
                     updated_by: updated_by,
                     paid_reason: paid_reason,
                     additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
41
# File 'lib/paysecure_api_documentation_live/models/status_history8.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['type'] = '_type'
  @_hash['status'] = 'status'
  @_hash['timestamp'] = 'timestamp'
  @_hash['updated_by'] = 'updatedBy'
  @_hash['paid_reason'] = 'paidReason'
  @_hash
end

.nullablesObject

An array for nullable fields



49
50
51
52
53
54
# File 'lib/paysecure_api_documentation_live/models/status_history8.rb', line 49

def self.nullables
  %w[
    updated_by
    paid_reason
  ]
end

.optionalsObject

An array for optional fields



44
45
46
# File 'lib/paysecure_api_documentation_live/models/status_history8.rb', line 44

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



105
106
107
108
109
110
# File 'lib/paysecure_api_documentation_live/models/status_history8.rb', line 105

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} type: #{@type.inspect}, status: #{@status.inspect}, timestamp:"\
  " #{@timestamp.inspect}, updated_by: #{@updated_by.inspect}, paid_reason:"\
  " #{@paid_reason.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



97
98
99
100
101
102
# File 'lib/paysecure_api_documentation_live/models/status_history8.rb', line 97

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} type: #{@type}, status: #{@status}, timestamp: #{@timestamp}, updated_by:"\
  " #{@updated_by}, paid_reason: #{@paid_reason}, additional_properties:"\
  " #{@additional_properties}>"
end