Class: Moov::Models::Components::ApplePayHeader
- Inherits:
-
Object
- Object
- Moov::Models::Components::ApplePayHeader
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/moov/models/components/applepayheader.rb
Overview
Information needed to decrypt Apple Pay payment data.
Refer to [Apple’s documentation](developer.apple.com/documentation/passkit/payment-token-format-reference#Header-keys-and-values) for more information.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(public_key_hash:, transaction_id:, ephemeral_public_key: nil) ⇒ ApplePayHeader
constructor
A new instance of ApplePayHeader.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(public_key_hash:, transaction_id:, ephemeral_public_key: nil) ⇒ ApplePayHeader
Returns a new instance of ApplePayHeader.
27 28 29 30 31 |
# File 'lib/moov/models/components/applepayheader.rb', line 27 def initialize(public_key_hash:, transaction_id:, ephemeral_public_key: nil) @public_key_hash = public_key_hash @transaction_id = transaction_id @ephemeral_public_key = ephemeral_public_key end |
Instance Method Details
#==(other) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/moov/models/components/applepayheader.rb', line 34 def ==(other) return false unless other.is_a? self.class return false unless @public_key_hash == other.public_key_hash return false unless @transaction_id == other.transaction_id return false unless @ephemeral_public_key == other.ephemeral_public_key true end |