Class: Bambora::Bank::Adapters::PaymentProfileResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/bambora/bank/adapters/payment_profile_response.rb

Overview

Transforms hash keys from camelCase to snake_case and strips vendor-specific prefixes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ PaymentProfileResponse

Returns a new instance of PaymentProfileResponse.



11
12
13
# File 'lib/bambora/bank/adapters/payment_profile_response.rb', line 11

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/bambora/bank/adapters/payment_profile_response.rb', line 9

def response
  @response
end

Instance Method Details

#to_hObject



15
16
17
18
19
# File 'lib/bambora/bank/adapters/payment_profile_response.rb', line 15

def to_h
  parsed_query_string.transform_keys do |key|
    transform(key)
  end
end