Module: StarkitBanking::Payment

Extended by:
ActiveSupport::Concern
Defined in:
lib/starkit_banking/concerns/payment.rb,
lib/starkit_banking/api/ybl/payment/activity.rb

Defined Under Namespace

Classes: Activity

Instance Method Summary collapse

Instance Method Details

#is_eftObject



11
12
13
# File 'lib/starkit_banking/concerns/payment.rb', line 11

def is_eft
  self.transfer_type != 'IMT'
end

#is_imtObject



7
8
9
# File 'lib/starkit_banking/concerns/payment.rb', line 7

def is_imt
  self.transfer_type == 'IMT'
end

#release(opts = {}) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/starkit_banking/concerns/payment.rb', line 15

def release(opts = {})
  self..instance_variable_set(:@password, opts[:api_password])
  self.environment = self..environment
  self.updated_by = opts[:current_user_id]
  self.approve
  self.reference_no = self.id      
  self.response = StarkitBanking::API::Factory.get_client(self).exec(self)
end

#sync_status(opts = {}) ⇒ Object



24
25
26
27
# File 'lib/starkit_banking/concerns/payment.rb', line 24

def sync_status(opts = {})
  self..instance_variable_set(:@password, opts[:api_password])
  self.response = StarkitBanking::API::Factory.get_client(self, 'GetStatus').exec(self)
end