Class: CloudPayments::Client::Serializer::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud_payments/client/serializer/base.rb

Direct Known Subclasses

MultiJson

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/cloud_payments/client/serializer/base.rb', line 8

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/cloud_payments/client/serializer/base.rb', line 6

def config
  @config
end

Instance Method Details

#dump(hash) ⇒ Object



16
17
18
# File 'lib/cloud_payments/client/serializer/base.rb', line 16

def dump(hash)
  convert_keys_to_api(hash)
end

#load(json) ⇒ Object



12
13
14
# File 'lib/cloud_payments/client/serializer/base.rb', line 12

def load(json)
  convert_keys_from_api(json)
end