Sha256: 609fea6e936f013b2a39ea88b21422ef3eba8e64d89e99d0e7f9cdf4aa08d758
Contents?: true
Size: 762 Bytes
Versions: 18
Compression:
Stored size: 762 Bytes
Contents
require File.expand_path('../common_request', __FILE__) module Gateway module Requests # # Request to change settings for whatsapp account via gateway # class SetProfileRequest < CommonRequest TYPE_NICKNAME = 1 # nickname TYPE_AVATAR = 2 # path to avatar TYPE_STATUS = 3 # status attr_accessor :type, :devicePhone, :value # # Possible types # def self.possible_types [TYPE_NICKNAME, TYPE_AVATAR, TYPE_STATUS] end def type=(type) unless self.class.possible_types.include? type raise Gateway::ArgumentError.new("type #{type} is not supported, use: #{self.class.possible_types.join(', ')}") end @type = type end end end end
Version data entries
18 entries across 18 versions & 2 rubygems