Class: RockRMS::Response::SavedPaymentMethod

Inherits:
Base
  • Object
show all
Defined in:
lib/rock_rms/response/saved_payment_method.rb

Constant Summary collapse

MAP =
{
  gateway_id: 'FinancialGatewayId',
  gateway_person_id: 'GatewayPersonIdentifier',
  is_default: 'IsDefault',
  name: 'Name',
  payment_details: 'FinancialPaymentDetail',
  payment_detail_id: 'FinancialPaymentDetailId',
  reference_number: 'ReferenceNumber'
}.freeze

Constants inherited from Base

Base::BASE_MAPPING

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

format, #format, #format_attributes, #initialize, #to_h

Constructor Details

This class inherits a constructor from RockRMS::Response::Base

Instance Method Details

#format_single(data) ⇒ Object



14
15
16
17
18
# File 'lib/rock_rms/response/saved_payment_method.rb', line 14

def format_single(data)
  response = to_h(MAP, data)
  response[:payment_details] = PaymentDetail.format(response[:payment_details])
  response
end