Class: Worldline::Connect::SDK::JSON::Marshaller
- Inherits:
-
Object
- Object
- Worldline::Connect::SDK::JSON::Marshaller
- Defined in:
- lib/worldline/connect/sdk/json/marshaller.rb
Overview
Class responsible for marshalling and unmarshalling objects to and from JSON
Direct Known Subclasses
Instance Method Summary collapse
-
#marshal(request_object) ⇒ String
Marshals request_object to JSON format by calling #to_h on it.
-
#unmarshal(response_json, type) ⇒ Object
Unmarshals a JSON string into an object of type type.
Instance Method Details
#marshal(request_object) ⇒ String
Marshals request_object to JSON format by calling #to_h on it.
12 13 14 |
# File 'lib/worldline/connect/sdk/json/marshaller.rb', line 12 def marshal(request_object) raise NotImplementedError end |
#unmarshal(response_json, type) ⇒ Object
Unmarshals a JSON string into an object of type type. The new object is initialized by calling .new_from_hash with contents of the JSON as a Hash object.
22 23 24 |
# File 'lib/worldline/connect/sdk/json/marshaller.rb', line 22 def unmarshal(response_json, type) raise NotImplementedError end |