class MeserOngkir::Starter::Province

Public Class Methods

all() click to toggle source
# File lib/meser_ongkir/starter/province.rb, line 9
def all
  call_api
end
call_api(params = nil) click to toggle source
# File lib/meser_ongkir/starter/province.rb, line 17
def call_api(params = nil)
  response = MeserOngkir::Api.new(account_type, main_path, params)
  JSON.parse response.read_body
end
find(id) click to toggle source
# File lib/meser_ongkir/starter/province.rb, line 13
def find(id)
  call_api(id: id)
end
main_path() click to toggle source
# File lib/meser_ongkir/starter/province.rb, line 22
def main_path
  :province
end