class Emvoicer::Services::Blinksale
Attributes
password[R]
subdomain[R]
username[R]
Public Class Methods
new(subdomain, username, password)
click to toggle source
# File lib/emvoicer/services/blinksale.rb, line 10 def initialize(subdomain, username, password) @subdomain = subdomain @username = username @password = password end
test_authentication_response(response)
click to toggle source
# File lib/emvoicer/services/blinksale.rb, line 39 def self.test_authentication_response(response) case response when Net::HTTPSuccess then true else false end end
Public Instance Methods
auth_params()
click to toggle source
# File lib/emvoicer/services/blinksale.rb, line 16 def auth_params [username, password] end
base_url()
click to toggle source
# File lib/emvoicer/services/blinksale.rb, line 27 def base_url "https://#{ subdomain }.blinksale.com" end
client_url(id)
click to toggle source
# File lib/emvoicer/services/blinksale.rb, line 35 def client_url(id) base_url + "/clients/#{ id }" end
headers()
click to toggle source
# File lib/emvoicer/services/blinksale.rb, line 20 def headers { "Content-Type" => "application/vnd.blinksale+xml", "Accept" => "application/vnd.blinksale+xml" } end
invoices_url()
click to toggle source
# File lib/emvoicer/services/blinksale.rb, line 31 def invoices_url base_url + "/invoices" end