lib/AfricasTalking/Token.rb in africastalking-ruby-2.1.6 vs lib/AfricasTalking/Token.rb in africastalking-ruby-2.1.7

- old
+ new

@@ -22,25 +22,10 @@ else raise AfricasTalkingException, response end end - def createCheckoutToken options - post_body = { - 'phoneNumber' => options['phoneNumber'] - } - url = getApiHost() + "/checkout/token/create" - response = sendNormalRequest(url, post_body) - # - if(@response_code == HTTP_CREATED) - r= JSON.parse(response, :quirky_mode => true) - return CheckoutTokenResponse.new r['token'], r['description'] - else - raise AfricasTalkingException, response - end - end - private def getApiHost() if(@username == "sandbox") return "https://api.sandbox.africastalking.com" @@ -53,14 +38,7 @@ class AuthTokenResponse attr_accessor :token, :lifetimeInSeconds def initialize token_, lifetimeInSeconds_ @token = token_ @lifetimeInSeconds = lifetimeInSeconds_ - end -end -class CheckoutTokenResponse - attr_accessor :token, :description - def initialize token_, description_ - @token = token_ - @description = description_ end end