class Moka::Get::PaymentList
Attributes
check_key[RW]
dealer_code[RW]
password[RW]
payment_end_date[RW]
payment_start_date[RW]
payment_status[RW]
trx_status[RW]
username[RW]
Public Class Methods
details() { |payment_list_details| ... }
click to toggle source
# File lib/moka/get/payment_list.rb, line 21 def self.details @@response = nil @@payment_list_details = Moka::Get::PaymentList.new yield @@payment_list_details if block_given? return @@payment_list_details end
new(details = {})
click to toggle source
# File lib/moka/get/payment_list.rb, line 10 def initialize(details = {}) @dealer_code = Moka.config.dealer_code @username = Moka.config.username @password = Moka.config.password @check_key = Moka.config.check_key @payment_start_date = details[:payment_start_date] @payment_end_date = details[:payment_end_date] @payment_status = details[:payment_status] @trx_status = details[:trx_status] end
Public Instance Methods
get_list()
click to toggle source
# File lib/moka/get/payment_list.rb, line 32 def get_list @@response = Moka::Request.get_payment_list(@@payment_list_details) end
list_count()
click to toggle source
# File lib/moka/get/payment_list.rb, line 48 def list_count if @@response["Data"] return @@response["Data"]["ListItemCount"] end if @@response return 0 end
request_details()
click to toggle source
# File lib/moka/get/payment_list.rb, line 28 def request_details @@payment_list_details end
response()
click to toggle source
# File lib/moka/get/payment_list.rb, line 36 def response @@response end
success?()
click to toggle source
# File lib/moka/get/payment_list.rb, line 41 def success? if @@response["Data"] return true if @@response["Data"]["IsSuccessful"] end if @@response return false end