Class: Ncba::MpesaPhoneNumberValidation

Inherits:
Resource
  • Object
show all
Defined in:
lib/ncba/resources/mpesa_phone_number_validation.rb

Overview

MpesaPhoneNumberValidation

Constant Summary collapse

PATH =
'/api/MpesaPhoneNumberValidation'

Instance Attribute Summary

Attributes inherited from Resource

#args, #client

Instance Method Summary collapse

Methods inherited from Resource

#get_request, #handle_response, #initialize, #post_request

Constructor Details

This class inherits a constructor from Ncba::Resource

Instance Method Details

#bodyObject



12
13
14
15
16
17
# File 'lib/ncba/resources/mpesa_phone_number_validation.rb', line 12

def body
  {
    "Mobile Number": args[:mobile_number],
    "Reference": args[:reference]
  }
end

#callObject



8
9
10
# File 'lib/ncba/resources/mpesa_phone_number_validation.rb', line 8

def call
  post_request(url: PATH, body: body).body
end