Class: EML::UK::Payload

Inherits:
Payload show all
Extended by:
T::Sig
Defined in:
lib/eml/uk/payload.rb,
lib/eml/uk/payload/iso.rb,
lib/eml/uk/payload/location.rb,
lib/eml/uk/payload/card/lock.rb,
lib/eml/uk/payload/card/show.rb,
lib/eml/uk/payload/card/void.rb,
lib/eml/uk/payload/card/reload.rb,
lib/eml/uk/payload/card/unload.rb,
lib/eml/uk/payload/card/unlock.rb,
lib/eml/uk/payload/card/register.rb,
lib/eml/uk/payload/agreement/show.rb,
lib/eml/uk/payload/card/activation.rb,
lib/eml/uk/payload/card/transaction.rb

Defined Under Namespace

Modules: Agreement, Card, ISO Classes: Location

Constant Summary

Constants inherited from Payload

Payload::ENDPOINT_CLASS_TYPE

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Payload

#to_h

Constructor Details

#initialize(payload) ⇒ Payload

Returns a new instance of Payload.



11
12
13
14
15
# File 'lib/eml/uk/payload.rb', line 11

def initialize(payload)
  payload = merge_optional_config(payload)
  payload = merge_required_config(payload)
  super
end

Class Method Details

.convert(resource_class, endpoint, payload) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/eml/uk/payload.rb', line 27

def convert(resource_class, endpoint, payload)
  endpoint_class = EML::UK::EndpointClass.(
    class_type: const_get(:ENDPOINT_CLASS_TYPE),
    resource_class: resource_class,
    endpoint: endpoint
  )

  convert_with_endpoint_class(
    endpoint: endpoint, endpoint_class: endpoint_class,
    payload: payload, resource_class: resource_class
  )
end