module AusPostAPI::Endpoint::ClassMethods

Public Instance Methods

optional_attributes(*args) click to toggle source
# File lib/aus_post_api/endpoint/attributes.rb, line 34
def optional_attributes(*args)
  if args.empty?
    @optional_attributes || []
  else
    @optional_attributes = args
    self.send(:attr_accessor, *args)
  end
end
required_attributes(*args) click to toggle source
# File lib/aus_post_api/endpoint/attributes.rb, line 25
def required_attributes(*args)
  if args.empty?
    @required_attributes || []
  else
    @required_attributes = args
    self.send(:attr_accessor, *args)
  end
end