Class: PaysecureApiDocumentationLive::ApplepayDecryptedPayload
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaysecureApiDocumentationLive::ApplepayDecryptedPayload
- Defined in:
- lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb
Overview
ApplepayDecryptedPayload Model.
Instance Attribute Summary collapse
-
#application_expiration_date ⇒ String
TODO: Write general description for this method.
-
#application_primary_account_number ⇒ String
TODO: Write general description for this method.
-
#currency_code ⇒ String
TODO: Write general description for this method.
-
#device_manufacturer_identifier ⇒ String
TODO: Write general description for this method.
-
#payment_data ⇒ PaymentData
TODO: Write general description for this method.
-
#payment_data_type ⇒ String
TODO: Write general description for this method.
-
#transaction_amount ⇒ 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(application_primary_account_number:, application_expiration_date:, currency_code:, transaction_amount:, device_manufacturer_identifier:, payment_data_type:, payment_data:, additional_properties: nil) ⇒ ApplepayDecryptedPayload
constructor
A new instance of ApplepayDecryptedPayload.
-
#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(application_primary_account_number:, application_expiration_date:, currency_code:, transaction_amount:, device_manufacturer_identifier:, payment_data_type:, payment_data:, additional_properties: nil) ⇒ ApplepayDecryptedPayload
Returns a new instance of ApplepayDecryptedPayload.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 65 def initialize(application_primary_account_number:, application_expiration_date:, currency_code:, transaction_amount:, device_manufacturer_identifier:, payment_data_type:, payment_data:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @application_primary_account_number = application_primary_account_number @application_expiration_date = application_expiration_date @currency_code = currency_code @transaction_amount = transaction_amount @device_manufacturer_identifier = device_manufacturer_identifier @payment_data_type = payment_data_type @payment_data = payment_data @additional_properties = additional_properties end |
Instance Attribute Details
#application_expiration_date ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 18 def application_expiration_date @application_expiration_date end |
#application_primary_account_number ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 14 def application_primary_account_number @application_primary_account_number end |
#currency_code ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 22 def currency_code @currency_code end |
#device_manufacturer_identifier ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 30 def device_manufacturer_identifier @device_manufacturer_identifier end |
#payment_data ⇒ PaymentData
TODO: Write general description for this method
38 39 40 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 38 def payment_data @payment_data end |
#payment_data_type ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 34 def payment_data_type @payment_data_type end |
#transaction_amount ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 26 def transaction_amount @transaction_amount end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 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 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. application_primary_account_number = hash.key?('applicationPrimaryAccountNumber') ? hash['applicationPrimaryAccountNumber'] : nil application_expiration_date = hash.key?('applicationExpirationDate') ? hash['applicationExpirationDate'] : nil currency_code = hash.key?('currencyCode') ? hash['currencyCode'] : nil transaction_amount = hash.key?('transactionAmount') ? hash['transactionAmount'] : nil device_manufacturer_identifier = hash.key?('deviceManufacturerIdentifier') ? hash['deviceManufacturerIdentifier'] : nil payment_data_type = hash.key?('paymentDataType') ? hash['paymentDataType'] : nil payment_data = PaymentData.from_hash(hash['paymentData']) if hash['paymentData'] # 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. ApplepayDecryptedPayload.new(application_primary_account_number: application_primary_account_number, application_expiration_date: application_expiration_date, currency_code: currency_code, transaction_amount: transaction_amount, device_manufacturer_identifier: device_manufacturer_identifier, payment_data_type: payment_data_type, payment_data: payment_data, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['application_primary_account_number'] = 'applicationPrimaryAccountNumber' @_hash['application_expiration_date'] = 'applicationExpirationDate' @_hash['currency_code'] = 'currencyCode' @_hash['transaction_amount'] = 'transactionAmount' @_hash['device_manufacturer_identifier'] = 'deviceManufacturerIdentifier' @_hash['payment_data_type'] = 'paymentDataType' @_hash['payment_data'] = 'paymentData' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
56 57 58 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 56 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 131 def inspect class_name = self.class.name.split('::').last "<#{class_name} application_primary_account_number:"\ " #{@application_primary_account_number.inspect}, application_expiration_date:"\ " #{@application_expiration_date.inspect}, currency_code: #{@currency_code.inspect},"\ " transaction_amount: #{@transaction_amount.inspect}, device_manufacturer_identifier:"\ " #{@device_manufacturer_identifier.inspect}, payment_data_type:"\ " #{@payment_data_type.inspect}, payment_data: #{@payment_data.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 125 126 127 128 |
# File 'lib/paysecure_api_documentation_live/models/applepay_decrypted_payload.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} application_primary_account_number: #{@application_primary_account_number},"\ " application_expiration_date: #{@application_expiration_date}, currency_code:"\ " #{@currency_code}, transaction_amount: #{@transaction_amount},"\ " device_manufacturer_identifier: #{@device_manufacturer_identifier}, payment_data_type:"\ " #{@payment_data_type}, payment_data: #{@payment_data}, additional_properties:"\ " #{@additional_properties}>" end |