Class: Moov::Models::Components::GooglePayToken

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/googlepaytoken.rb

Overview

Contains the encrypted payment token as returned from Google Pay.

Refer to [Google's documentation](https://developers.google.com/pay/api/web/guides/resources/payment-data-cryptography#payment-method-token-structure)
for more information.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(protocol_version:, signature:, intermediate_signing_key:, signed_message:) ⇒ GooglePayToken

Returns a new instance of GooglePayToken.



28
29
30
31
32
33
# File 'lib/moov/models/components/googlepaytoken.rb', line 28

def initialize(protocol_version:, signature:, intermediate_signing_key:, signed_message:)
  @protocol_version = protocol_version
  @signature = signature
  @intermediate_signing_key = intermediate_signing_key
  @signed_message = signed_message
end

Instance Method Details

#==(other) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/moov/models/components/googlepaytoken.rb', line 36

def ==(other)
  return false unless other.is_a? self.class
  return false unless @protocol_version == other.protocol_version
  return false unless @signature == other.signature
  return false unless @intermediate_signing_key == other.intermediate_signing_key
  return false unless @signed_message == other.signed_message
  true
end