Class: PaypalServerSdk::NetworkTransactionReferenceEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::NetworkTransactionReferenceEntity
- Defined in:
- lib/paypal_server_sdk/models/network_transaction_reference_entity.rb
Overview
Previous network transaction reference including id and network.
Instance Attribute Summary collapse
-
#date ⇒ String
The date that the transaction was authorized by the scheme.
-
#id ⇒ String
Transaction reference id returned by the scheme.
-
#network ⇒ CardBrand
The card network or brand.
-
#time ⇒ String
The date and time, in [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6).
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(id:, date: SKIP, network: SKIP, time: SKIP) ⇒ NetworkTransactionReferenceEntity
constructor
A new instance of NetworkTransactionReferenceEntity.
Methods inherited from BaseModel
Constructor Details
#initialize(id:, date: SKIP, network: SKIP, time: SKIP) ⇒ NetworkTransactionReferenceEntity
Returns a new instance of NetworkTransactionReferenceEntity.
64 65 66 67 68 69 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 64 def initialize(id:, date: SKIP, network: SKIP, time: SKIP) @id = id @date = date unless date == SKIP @network = network unless network == SKIP @time = time unless time == SKIP end |
Instance Attribute Details
#date ⇒ String
The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as “BankNet reference date.
25 26 27 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 25 def date @date end |
#id ⇒ String
Transaction reference id returned by the scheme. For Visa and Amex, this is the “Tran id” field in response. For MasterCard, this is the “BankNet reference id” field in response. For Discover, this is the “NRID” field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
19 20 21 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 19 def id @id end |
#network ⇒ CardBrand
The card network or brand. Applies to credit, debit, gift, and payment cards.
30 31 32 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 30 def network @network end |
#time ⇒ String
The date and time, in [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong> The regular expression provides guidance but does not reject all invalid dates.</blockquote>
38 39 40 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 38 def time @time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : nil date = hash.key?('date') ? hash['date'] : SKIP network = hash.key?('network') ? hash['network'] : SKIP time = hash.key?('time') ? hash['time'] : SKIP # Create object from extracted values. NetworkTransactionReferenceEntity.new(id: id, date: date, network: network, time: time) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['date'] = 'date' @_hash['network'] = 'network' @_hash['time'] = 'time' @_hash end |
.nullables ⇒ Object
An array for nullable fields
60 61 62 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 60 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 54 55 56 57 |
# File 'lib/paypal_server_sdk/models/network_transaction_reference_entity.rb', line 51 def self.optionals %w[ date network time ] end |