Module: UU::Fairpay2::BusinessCase::ClientAccountBusinessCase
- Extended by:
- ClientAccountBusinessCase
- Included in:
- ClientAccountBusinessCase
- Defined in:
- lib/uu/fairpay2/client_account_business_case.rb
Overview
Module Client Account Business Case. This service allows managing Client Account Business Case(CABC).
Constant Summary
- PATH =
Service path
'uu/fairpay2/businesscase/ClientAccountBusinessCase'
Instance Method Summary (collapse)
-
- (UU::OS::UESURI) create(location_uri, business_case = nil)
Creates a new Client Account Business Case.
-
- (UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseSums) debit_transaction_sums(business_case_uri)
Obtains Client Account Business Case daily, weekly, monthly sums of outgoing transactions from REST service and returns them.
- - (UU::OS::UESURI) find_by_account_number(territory_uri, account_number = nil) deprecated Deprecated.
-
- (UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseAttributes) get_attributes(business_case_uri)
Obtains Client Account Business Case attributes from REST service and returns them.
-
- (UU::FairPay2::BusinessCase::ClientAccountBusinessCaseSums) get_sums(business_case_uri)
deprecated
Deprecated.
Use #debit_transaction_sums instead.
-
- (UU::OS::UESURI) set_attributes(business_case_uri, business_case_attributes = nil)
Sets attributes of Client Account Business Case.
Instance Method Details
- (UU::OS::UESURI) create(location_uri, business_case = nil)
Creates a new Client Account Business Case. The command creates a new
Client Account Business Case in a specified location with passed DTO
parameters.
Required attributes:
name, meta_artifact_uri, user_universe_id, client_uuee_universe_id, client_account_number, available_balance, current_balance, authorized_persons, authorized_accounts, daily_limit, weekly_limit, monthly_limit, overdraft_limit, currency_code
73 74 75 76 77 78 79 80 81 |
# File 'lib/uu/fairpay2/client_account_business_case.rb', line 73 def create(location_uri, business_case = nil) svc = UU::OS::REST::RemoteClient.new(ClientAccountBusinessCase) clibc_create = UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseCreate.new(business_case).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('create', location_uri, clibc_create) return UU::OS::UESURI.new(res) end end |
- (UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseSums) debit_transaction_sums(business_case_uri)
Obtains Client Account Business Case daily, weekly, monthly sums of outgoing transactions from REST service and returns them
180 181 182 183 184 185 186 187 |
# File 'lib/uu/fairpay2/client_account_business_case.rb', line 180 def debit_transaction_sums(business_case_uri) svc = UU::OS::REST::RemoteClient.new(ClientAccountBusinessCase) UU::OS::QoS::QoSHandler.auto_retry do attrs = svc.post('debitTransactionSums', business_case_uri) return UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseSums.new(attrs) end end |
- (UU::OS::UESURI) find_by_account_number(territory_uri, account_number = nil)
Returns UESURI of client account business case specified by client account number in value object
Required attribute:
client_account_number
206 207 208 209 210 211 212 213 214 |
# File 'lib/uu/fairpay2/client_account_business_case.rb', line 206 def find_by_account_number(territory_uri, account_number = nil) svc = UU::OS::REST::RemoteClient.new(ClientAccountBusinessCase) account_number_dto = UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseAccountNumber.new(account_number).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('findByAccountNumber', territory_uri, account_number_dto) return UU::OS::UESURI.new(res) end end |
- (UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseAttributes) get_attributes(business_case_uri)
Obtains Client Account Business Case attributes from REST service and returns them
95 96 97 98 99 100 101 102 |
# File 'lib/uu/fairpay2/client_account_business_case.rb', line 95 def get_attributes(business_case_uri) svc = UU::OS::REST::RemoteClient.new(ClientAccountBusinessCase) UU::OS::QoS::QoSHandler.auto_retry do attrs = svc.post('getAttributes', business_case_uri) return UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseAttributes.new(attrs) end end |
- (UU::FairPay2::BusinessCase::ClientAccountBusinessCaseSums) get_sums(business_case_uri)
Use #debit_transaction_sums instead.
Obtains Client Account Business Case daily, weekly, monthly sums of outcomes transactions from REST service and returns them
158 159 160 161 162 163 164 165 |
# File 'lib/uu/fairpay2/client_account_business_case.rb', line 158 def get_sums(business_case_uri) svc = UU::OS::REST::RemoteClient.new(ClientAccountBusinessCase) UU::OS::QoS::QoSHandler.auto_retry do attrs = svc.post('debitTransactionSums', business_case_uri) return UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseSums.new(attrs) end end |
- (UU::OS::UESURI) set_attributes(business_case_uri, business_case_attributes = nil)
Sets attributes of Client Account Business Case.
135 136 137 138 139 140 141 142 143 |
# File 'lib/uu/fairpay2/client_account_business_case.rb', line 135 def set_attributes(business_case_uri, business_case_attributes = nil) svc = UU::OS::REST::RemoteClient.new(ClientAccountBusinessCase) bc_attrs = UU::Fairpay2::BusinessCase::ClientAccountBusinessCaseSetAttributes.new(business_case_attributes).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', business_case_uri, bc_attrs) return UU::OS::UESURI.new(res) end end |