Class: OnlinePayments::SDK::Domain::PaymentAccountOnFile

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/payment_account_on_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#create_dateString

Returns the current value of create_date.

Returns:

  • (String)

    the current value of create_date



11
12
13
# File 'lib/onlinepayments/sdk/domain/payment_account_on_file.rb', line 11

def create_date
  @create_date
end

#number_of_card_on_file_creation_attempts_last24_hoursInteger

Returns the current value of number_of_card_on_file_creation_attempts_last24_hours.

Returns:

  • (Integer)

    the current value of number_of_card_on_file_creation_attempts_last24_hours



11
12
13
# File 'lib/onlinepayments/sdk/domain/payment_account_on_file.rb', line 11

def number_of_card_on_file_creation_attempts_last24_hours
  @number_of_card_on_file_creation_attempts_last24_hours
end

Instance Method Details

#from_hash(hash) ⇒ Object



23
24
25
26
27
# File 'lib/onlinepayments/sdk/domain/payment_account_on_file.rb', line 23

def from_hash(hash)
  super
  @create_date = hash['createDate'] if hash.key? 'createDate'
  @number_of_card_on_file_creation_attempts_last24_hours = hash['numberOfCardOnFileCreationAttemptsLast24Hours'] if hash.key? 'numberOfCardOnFileCreationAttemptsLast24Hours'
end

#to_hHash

Returns:

  • (Hash)


16
17
18
19
20
21
# File 'lib/onlinepayments/sdk/domain/payment_account_on_file.rb', line 16

def to_h
  hash = super
  hash['createDate'] = @create_date unless @create_date.nil?
  hash['numberOfCardOnFileCreationAttemptsLast24Hours'] = @number_of_card_on_file_creation_attempts_last24_hours unless @number_of_card_on_file_creation_attempts_last24_hours.nil?
  hash
end