Class: K2ConnectRuby::K2Entity::K2FinancialEntities::TransferAccount::MerchantMpesaWallet

Inherits:
TransferAccountRequest
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/k2-connect-ruby/k2_entity/k2_financial_entities/transfer_account/merchant_mpesa_wallet.rb

Instance Attribute Summary collapse

Attributes inherited from TransferAccountRequest

#nickname, #type

Instance Method Summary collapse

Methods inherited from TransferAccountRequest

#initialize

Constructor Details

This class inherits a constructor from K2ConnectRuby::K2Entity::K2FinancialEntities::TransferAccount::TransferAccountRequest

Instance Attribute Details

#emailObject

Returns the value of attribute email.



10
11
12
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/transfer_account/merchant_mpesa_wallet.rb', line 10

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



10
11
12
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/transfer_account/merchant_mpesa_wallet.rb', line 10

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



10
11
12
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/transfer_account/merchant_mpesa_wallet.rb', line 10

def last_name
  @last_name
end

#networkObject

Returns the value of attribute network.



10
11
12
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/transfer_account/merchant_mpesa_wallet.rb', line 10

def network
  @network
end

#phone_numberObject

Returns the value of attribute phone_number.



10
11
12
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/transfer_account/merchant_mpesa_wallet.rb', line 10

def phone_number
  @phone_number
end

Instance Method Details

#endpointObject



21
22
23
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/transfer_account/merchant_mpesa_wallet.rb', line 21

def endpoint
  K2ConnectRuby::K2Utilities::Config::K2Config.endpoint("settlement_mobile_wallet")
end

#request_bodyObject



25
26
27
28
29
30
31
32
33
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/transfer_account/merchant_mpesa_wallet.rb', line 25

def request_body
  {
    nickname: nickname,
    first_name: first_name,
    last_name: last_name,
    phone_number: phone_number,
    network: network,
  }
end