Class: PaysecureApiDocumentationLive::Payment17
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaysecureApiDocumentationLive::Payment17
- Defined in:
- lib/paysecure_api_documentation_live/models/payment17.rb
Overview
Payment17 Model.
Instance Attribute Summary collapse
-
#amount ⇒ Float
TODO: Write general description for this method.
-
#currency ⇒ String
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#fee_amount ⇒ Integer
TODO: Write general description for this method.
-
#is_outgoing ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#net_amount ⇒ Float
TODO: Write general description for this method.
-
#paid_on ⇒ Integer
TODO: Write general description for this method.
-
#payment_type ⇒ String
TODO: Write general description for this method.
-
#pending_amount ⇒ Integer
TODO: Write general description for this method.
-
#pending_unfreeze_on ⇒ String
TODO: Write general description for this method.
-
#remote_paid_on ⇒ Integer
TODO: Write general description for this method.
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(is_outgoing:, payment_type:, amount:, currency:, net_amount:, fee_amount:, pending_amount:, pending_unfreeze_on:, description:, paid_on:, remote_paid_on:, additional_properties: nil) ⇒ Payment17
constructor
A new instance of Payment17.
-
#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(is_outgoing:, payment_type:, amount:, currency:, net_amount:, fee_amount:, pending_amount:, pending_unfreeze_on:, description:, paid_on:, remote_paid_on:, additional_properties: nil) ⇒ Payment17
Returns a new instance of Payment17.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 85 def initialize(is_outgoing:, payment_type:, amount:, currency:, net_amount:, fee_amount:, pending_amount:, pending_unfreeze_on:, description:, paid_on:, remote_paid_on:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @is_outgoing = is_outgoing @payment_type = payment_type @amount = amount @currency = currency @net_amount = net_amount @fee_amount = fee_amount @pending_amount = pending_amount @pending_unfreeze_on = pending_unfreeze_on @description = description @paid_on = paid_on @remote_paid_on = remote_paid_on @additional_properties = additional_properties end |
Instance Attribute Details
#amount ⇒ Float
TODO: Write general description for this method
22 23 24 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 22 def amount @amount end |
#currency ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 26 def currency @currency end |
#description ⇒ String
TODO: Write general description for this method
46 47 48 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 46 def description @description end |
#fee_amount ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 34 def fee_amount @fee_amount end |
#is_outgoing ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 14 def is_outgoing @is_outgoing end |
#net_amount ⇒ Float
TODO: Write general description for this method
30 31 32 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 30 def net_amount @net_amount end |
#paid_on ⇒ Integer
TODO: Write general description for this method
50 51 52 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 50 def paid_on @paid_on end |
#payment_type ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 18 def payment_type @payment_type end |
#pending_amount ⇒ Integer
TODO: Write general description for this method
38 39 40 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 38 def pending_amount @pending_amount end |
#pending_unfreeze_on ⇒ String
TODO: Write general description for this method
42 43 44 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 42 def pending_unfreeze_on @pending_unfreeze_on end |
#remote_paid_on ⇒ Integer
TODO: Write general description for this method
54 55 56 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 54 def remote_paid_on @remote_paid_on end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
107 108 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 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 107 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. is_outgoing = hash.key?('is_outgoing') ? hash['is_outgoing'] : nil payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil amount = hash.key?('amount') ? hash['amount'] : nil currency = hash.key?('currency') ? hash['currency'] : nil net_amount = hash.key?('net_amount') ? hash['net_amount'] : nil fee_amount = hash.key?('fee_amount') ? hash['fee_amount'] : nil pending_amount = hash.key?('pending_amount') ? hash['pending_amount'] : nil pending_unfreeze_on = hash.key?('pending_unfreeze_on') ? hash['pending_unfreeze_on'] : nil description = hash.key?('description') ? hash['description'] : nil paid_on = hash.key?('paid_on') ? hash['paid_on'] : nil remote_paid_on = hash.key?('remote_paid_on') ? hash['remote_paid_on'] : 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. Payment17.new(is_outgoing: is_outgoing, payment_type: payment_type, amount: amount, currency: currency, net_amount: net_amount, fee_amount: fee_amount, pending_amount: pending_amount, pending_unfreeze_on: pending_unfreeze_on, description: description, paid_on: paid_on, remote_paid_on: remote_paid_on, 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 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 57 def self.names @_hash = {} if @_hash.nil? @_hash['is_outgoing'] = 'is_outgoing' @_hash['payment_type'] = 'payment_type' @_hash['amount'] = 'amount' @_hash['currency'] = 'currency' @_hash['net_amount'] = 'net_amount' @_hash['fee_amount'] = 'fee_amount' @_hash['pending_amount'] = 'pending_amount' @_hash['pending_unfreeze_on'] = 'pending_unfreeze_on' @_hash['description'] = 'description' @_hash['paid_on'] = 'paid_on' @_hash['remote_paid_on'] = 'remote_paid_on' @_hash end |
.nullables ⇒ Object
An array for nullable fields
79 80 81 82 83 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 79 def self.nullables %w[ pending_unfreeze_on ] end |
.optionals ⇒ Object
An array for optional fields
74 75 76 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 74 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
159 160 161 162 163 164 165 166 167 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 159 def inspect class_name = self.class.name.split('::').last "<#{class_name} is_outgoing: #{@is_outgoing.inspect}, payment_type:"\ " #{@payment_type.inspect}, amount: #{@amount.inspect}, currency: #{@currency.inspect},"\ " net_amount: #{@net_amount.inspect}, fee_amount: #{@fee_amount.inspect}, pending_amount:"\ " #{@pending_amount.inspect}, pending_unfreeze_on: #{@pending_unfreeze_on.inspect},"\ " description: #{@description.inspect}, paid_on: #{@paid_on.inspect}, remote_paid_on:"\ " #{@remote_paid_on.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
149 150 151 152 153 154 155 156 |
# File 'lib/paysecure_api_documentation_live/models/payment17.rb', line 149 def to_s class_name = self.class.name.split('::').last "<#{class_name} is_outgoing: #{@is_outgoing}, payment_type: #{@payment_type}, amount:"\ " #{@amount}, currency: #{@currency}, net_amount: #{@net_amount}, fee_amount:"\ " #{@fee_amount}, pending_amount: #{@pending_amount}, pending_unfreeze_on:"\ " #{@pending_unfreeze_on}, description: #{@description}, paid_on: #{@paid_on},"\ " remote_paid_on: #{@remote_paid_on}, additional_properties: #{@additional_properties}>" end |