Module: UU::Finman::FinancialTransaction::PaymentCopy
- Extended by:
- PaymentCopy
- Included in:
- PaymentCopy
- Defined in:
- lib/uu/finman/payment_copy.rb
Overview
Module of Payment copy
Constant Summary
- PATH =
Service path
'uu/finman/financialtransaction/FinancialTransaction'
Instance Method Summary (collapse)
-
- (PaymentCopyAttributes) get_attributes(payment_copy_uri)
Obtains Payment copy attributes from service and returns them.
-
- (UU::OS::UESURI) set_attributes(payment_copy_uri, payment_copy_set_attributes)
Sets attributes of Payment copy.
Instance Method Details
- (PaymentCopyAttributes) get_attributes(payment_copy_uri)
Obtains Payment copy attributes from service and returns them
33 34 35 36 37 38 39 40 41 |
# File 'lib/uu/finman/payment_copy.rb', line 33 def get_attributes(payment_copy_uri) svc = UU::OS::REST::RemoteClient.new(PaymentCopy) UU::OS::QoS::QoSHandler.auto_retry do attrs_string = svc.get('getAttributes', payment_copy_uri) attrs = JSON.parse(attrs_string, :symbolize_names => true) attrs = remove_invalid_keys(attrs) return UU::Finman::FinancialTransaction::PaymentCopyAttributes.new(attrs) end end |
- (UU::OS::UESURI) set_attributes(payment_copy_uri, payment_copy_set_attributes)
Sets attributes of Payment copy.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/uu/finman/payment_copy.rb', line 59 def set_attributes(payment_copy_uri, payment_copy_set_attributes) svc = UU::OS::REST::RemoteClient.new(PaymentCopy) payment_copy_dto = UU::Finman::FinancialTransaction::PaymentCopySetAttributes.new(payment_copy_set_attributes) # adjust given payment dto to match expected format of financial transaction command payment_copy_dto = transform_modify_payment_to_transaction_dto(payment_copy_dto) payment_copy_dto = payment_copy_dto.to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', payment_copy_uri, payment_copy_dto) return UU::OS::UESURI.new(res) end end |