class Xolphin::Api::Endpoint::Support

Public Class Methods

new(http) click to toggle source
# File lib/xolphin/api/endpoint/support.rb, line 5
def initialize(http)
  @http = http
end

Public Instance Methods

approver_email_addresses(domain) click to toggle source
# File lib/xolphin/api/endpoint/support.rb, line 41
def approver_email_addresses(domain)
  @http.get("/approver-email-addresses", domain: domain)
end
decode_csr(csr) click to toggle source
# File lib/xolphin/api/endpoint/support.rb, line 35
def decode_csr(csr)
  result = @http.post("/decode-csr", csr: csr)

  Xolphin::Api::Responses::CsrData.new(result)
end
product(id) click to toggle source
# File lib/xolphin/api/endpoint/support.rb, line 29
def product(id)
  result = @http.get("/products/#{id}")

  Xolphin::Api::Responses::Product.new(result)
end
products() click to toggle source
# File lib/xolphin/api/endpoint/support.rb, line 9
def products
  products = []

  result = @http.get("/products", page: 1)
  response = Xolphin::Api::Responses::Products.new(result)

  unless response.error?
    products = response.products
    while response.page < response.pages
      result = @http.get("/products", page: response.page + 1)
      response = Xolphin::Api::Responses::Products.new(result)
      break if response.error?

      products += response.products
    end
  end

  products
end