Class: EVSS::PPIU::PaymentInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/evss/ppiu/payment_information.rb

Overview

Model for payment information

Instance Attribute Summary collapse

Instance Attribute Details

#control_informationEVSS::PPIU::ControlInformation

Returns Data object to determine if the user can update their address.

Returns:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/evss/ppiu/payment_information.rb', line 22

class PaymentInformation
  include Virtus.model

  attribute :control_information, EVSS::PPIU::ControlInformation
  attribute :payment_account, EVSS::PPIU::PaymentAccount
  attribute :payment_address, EVSS::PPIU::PaymentAddress
  attribute :payment_type, String

  delegate :authorized?, to: :control_information

  def 
    authorized? ? @payment_account : EVSS::PPIU::PaymentAccount.new
  end

  def payment_address
    authorized? ? @payment_address : EVSS::PPIU::PaymentAddress.new
  end
end

#payment_accountEVSS::PPIU::PaymentAccount

Returns The user’s payment account.

Returns:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/evss/ppiu/payment_information.rb', line 22

class PaymentInformation
  include Virtus.model

  attribute :control_information, EVSS::PPIU::ControlInformation
  attribute :payment_account, EVSS::PPIU::PaymentAccount
  attribute :payment_address, EVSS::PPIU::PaymentAddress
  attribute :payment_type, String

  delegate :authorized?, to: :control_information

  def 
    authorized? ? @payment_account : EVSS::PPIU::PaymentAccount.new
  end

  def payment_address
    authorized? ? @payment_address : EVSS::PPIU::PaymentAddress.new
  end
end

#payment_addressEVSS::PPIU::PaymentAddress

Returns The user’s payment address.

Returns:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/evss/ppiu/payment_information.rb', line 22

class PaymentInformation
  include Virtus.model

  attribute :control_information, EVSS::PPIU::ControlInformation
  attribute :payment_account, EVSS::PPIU::PaymentAccount
  attribute :payment_address, EVSS::PPIU::PaymentAddress
  attribute :payment_type, String

  delegate :authorized?, to: :control_information

  def 
    authorized? ? @payment_account : EVSS::PPIU::PaymentAccount.new
  end

  def payment_address
    authorized? ? @payment_address : EVSS::PPIU::PaymentAddress.new
  end
end

#payment_typeString

Returns The payment type.

Returns:

  • (String)

    The payment type



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/evss/ppiu/payment_information.rb', line 22

class PaymentInformation
  include Virtus.model

  attribute :control_information, EVSS::PPIU::ControlInformation
  attribute :payment_account, EVSS::PPIU::PaymentAccount
  attribute :payment_address, EVSS::PPIU::PaymentAddress
  attribute :payment_type, String

  delegate :authorized?, to: :control_information

  def 
    authorized? ? @payment_account : EVSS::PPIU::PaymentAccount.new
  end

  def payment_address
    authorized? ? @payment_address : EVSS::PPIU::PaymentAddress.new
  end
end