Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module FdrGateway
- class Env
- def self.fdr_api_cert
- ENV['FDR_API_CERT'].gsub("\\n", "\n")
- end
- def self.fdr_api_key
- ENV['FDR_API_KEY'].gsub("\\n", "\n")
- end
- end
- late_fee_accounts_with_params = [
- {account_id: 'FD REFERENCE', transactionAmount: 'LATE FEE AMOUNT'},
- ]
- late_fee_failures = []
- late_fee_accounts_with_params.each do |params|
- result = RestApi.call(
- path: '/fs/maintenance/v2/adjustmentTransaction',
- account_id: params[:account_id],
- json_params: {
- batchPrefix: 'RL',
- batchType: '05',
- transactionCode: '282',
- transactionAmount: params[:transactionAmount],
- merchantAccountIdentifier: '515942010000248',
- transactionPostingDate: 'DATE OF EXECUTION'
- }
- )
- if result.failure?
- late_fee_failures << "Account #{params[:account_id]} failed with status #{result.status}"
- end
- end
- puts late_fee_failures
Add Comment
Please, Sign In to add comment