Class: MekariSso::Province

Inherits:
List show all
Defined in:
lib/params/province.rb

Instance Attribute Summary collapse

Attributes inherited from List

#access_token, #limit, #page

Attributes inherited from Config

#accept_language, #access_token, #base_url, #client_id, #client_secret

Instance Method Summary collapse

Methods inherited from Config

#apply

Constructor Details

#initialize(options = nil) ⇒ Province

Returns a new instance of Province.



10
11
12
# File 'lib/params/province.rb', line 10

def initialize(options = nil)
  apply(options) if options
end

Instance Attribute Details

#province_idObject

Returns the value of attribute province_id.



8
9
10
# File 'lib/params/province.rb', line 8

def province_id
  @province_id
end

Instance Method Details

#available_keysObject



14
15
16
# File 'lib/params/province.rb', line 14

def available_keys
  super + %i[province_id]
end

#validate_required!Object



18
19
20
21
22
# File 'lib/params/province.rb', line 18

def validate_required!
  unless @province_id.present?
    raise ArgumentError, "Params province_id is required options"
  end
end