Class: DiscountNetwork::Provider

Inherits:
Base
  • Object
show all
Defined in:
lib/discountnetwork/provider.rb

Instance Method Summary collapse

Methods inherited from Base

method_missing

Instance Method Details

#find_by_slug(slug) ⇒ Object



9
10
11
12
13
# File 'lib/discountnetwork/provider.rb', line 9

def find_by_slug(slug)
  DiscountNetwork.get_resource(
    ["providers", slug].join("/"),
  ).provider
end

#where(type:) ⇒ Object



3
4
5
6
7
# File 'lib/discountnetwork/provider.rb', line 3

def where(type:)
  DiscountNetwork.get_resource(
    "providers", type: type
  ).providers
end