Class: PaysecureApiDocumentationLive::PaymentMethodDetails
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaysecureApiDocumentationLive::PaymentMethodDetails
- Defined in:
- lib/paysecure_api_documentation_live/models/payment_method_details.rb
Overview
PaymentMethodDetails Model.
Instance Attribute Summary collapse
-
#auth_method ⇒ String
TODO: Write general description for this method.
-
#cryptogram ⇒ String
TODO: Write general description for this method.
-
#eci_indicator ⇒ String
TODO: Write general description for this method.
-
#expiration_month ⇒ Integer
TODO: Write general description for this method.
-
#expiration_year ⇒ Integer
TODO: Write general description for this method.
-
#pan ⇒ String
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(pan:, expiration_month:, expiration_year:, auth_method:, cryptogram:, eci_indicator:, additional_properties: nil) ⇒ PaymentMethodDetails
constructor
A new instance of PaymentMethodDetails.
-
#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(pan:, expiration_month:, expiration_year:, auth_method:, cryptogram:, eci_indicator:, additional_properties: nil) ⇒ PaymentMethodDetails
Returns a new instance of PaymentMethodDetails.
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 58 def initialize(pan:, expiration_month:, expiration_year:, auth_method:, cryptogram:, eci_indicator:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @pan = pan @expiration_month = expiration_month @expiration_year = expiration_year @auth_method = auth_method @cryptogram = cryptogram @eci_indicator = eci_indicator @additional_properties = additional_properties end |
Instance Attribute Details
#auth_method ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 26 def auth_method @auth_method end |
#cryptogram ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 30 def cryptogram @cryptogram end |
#eci_indicator ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 34 def eci_indicator @eci_indicator end |
#expiration_month ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 18 def expiration_month @expiration_month end |
#expiration_year ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 22 def expiration_year @expiration_year end |
#pan ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 14 def pan @pan end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 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/paysecure_api_documentation_live/models/payment_method_details.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. pan = hash.key?('pan') ? hash['pan'] : nil expiration_month = hash.key?('expirationMonth') ? hash['expirationMonth'] : nil expiration_year = hash.key?('expirationYear') ? hash['expirationYear'] : nil auth_method = hash.key?('authMethod') ? hash['authMethod'] : nil cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : nil eci_indicator = hash.key?('eciIndicator') ? hash['eciIndicator'] : 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. PaymentMethodDetails.new(pan: pan, expiration_month: expiration_month, expiration_year: expiration_year, auth_method: auth_method, cryptogram: cryptogram, eci_indicator: eci_indicator, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['pan'] = 'pan' @_hash['expiration_month'] = 'expirationMonth' @_hash['expiration_year'] = 'expirationYear' @_hash['auth_method'] = 'authMethod' @_hash['cryptogram'] = 'cryptogram' @_hash['eci_indicator'] = 'eciIndicator' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 54 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 49 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
112 113 114 115 116 117 118 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 112 def inspect class_name = self.class.name.split('::').last "<#{class_name} pan: #{@pan.inspect}, expiration_month: #{@expiration_month.inspect},"\ " expiration_year: #{@expiration_year.inspect}, auth_method: #{@auth_method.inspect},"\ " cryptogram: #{@cryptogram.inspect}, eci_indicator: #{@eci_indicator.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
104 105 106 107 108 109 |
# File 'lib/paysecure_api_documentation_live/models/payment_method_details.rb', line 104 def to_s class_name = self.class.name.split('::').last "<#{class_name} pan: #{@pan}, expiration_month: #{@expiration_month}, expiration_year:"\ " #{@expiration_year}, auth_method: #{@auth_method}, cryptogram: #{@cryptogram},"\ " eci_indicator: #{@eci_indicator}, additional_properties: #{@additional_properties}>" end |