class Doconomy::Api::MerchantCategory

Attributes

code[RW]

Public Class Methods

all() click to toggle source

Returns all merchant categories

@return [Array<Doconomy::Api::MerchantCategory>]

# File lib/doconomy/api/merchant_category.rb, line 18
def all
  response = client.get("/aland-index/#{Doconomy::Api.configuration.api_version}/merchant-categories")
  response[:merchant_categories].map { |attributes| new(attributes) }
end
new(attributes = {}) click to toggle source
# File lib/doconomy/api/merchant_category.rb, line 8
def initialize(attributes = {})
  @attributes = attributes.deep_symbolize_keys
  @code = @attributes[:code]
end