Set user's contact information that is sent out with business cards
 value should be a hash {:first_name => "John", :last_name => "Doe", :email => "John.Doe@example.com", :additional_contact_info => "Only email on weekdays"}
775246
def auto_share_contact_details=(value)
      first_name = value[:first_name] || ''
      last_name = value[:last_name] || ''
      email = value[:email] || ''
      additional_contact_info = value[:additional_contact_info] || ''
      xml = Builder::XmlMarkup.new
      xml.instruct!
      xml.Request(:xmlns => "urn:sbx:apis:SbxBaseComponents") do |xml|
        connection.requester_credentials_block(xml)
        xml.UpdateAutoShareContactDetailsCall do |xml|
          xml.FirstName(first_name)
          xml.LastName(last_name)
          xml.Email(email)
          xml.AdditionalContactDetails(additional_contact_details)
        end
      end
      response = connection.post_xml(xml)
      # TODO: Retrieve the new value to make sure it worked?
      # TODO: This can throw some specific efforts; see http://developer.shoeboxed.com/business-cards
      value
    end
804903
def show
      @contact = Contact.find(params[:id])
  
      respond_to do |format|
        format.html # show.html.erb
        format.json { render json: @contact }
      end
    end
362630
def create(attributes_hash)
      #the tap method allows preconfigured methods and values to
      #be associated with the instance during instantiation while also automatically returning
      #the object after its creation is concluded.
      self.new.tap do |card|
        attributes_hash.each do |key, value|
          #sending the new instance the key name as a setter with the value
          card.send("#{key}=", value)
          #string interpolation is used as the method doesn't know the key name yet
          #but an = sign is implemented into the string in order to asssociate it as a setter
        end
        #saves the new instance into the database
        card.save
      end
    end
705664
def user_email_for_activity(activity)
      return activity.user if activity.user.is_a?(String)

      @user_emails ||= begin
        User.select([:id, :email]).all.each_with_object({}) do |user, hash|
          hash[user.id] = user.email
        end
      end
      @user_emails[activity.user_id]
    end
521956
def create_contact(self, email, name):
        
        params = {'email': email, 'name': name}

        url = self.CONTACTS_URL

        connection = Connection(self.token)
        connection.set_url(self.production, url)
        connection.add_header('Content-Type', 'application/json')
        connection.add_params(params, json_format=True)

        return connection.post_request()
705240
def user_update(self, display_name=None, first_name=None, last_name=None,
                    email=None, password=None, current_password=None,
                    birth_date=None, gender=None, website=None, subdomain=None,
                    location=None, newsletter=None, primary_usage=None,
                    timezone=None):
        
        return self.request("user/update", QueryParams({
            "display_name": display_name,
            "first_name": first_name,
            "last_name": last_name,
            "email": email,
            "password": password,
            "current_password": current_password,
            "birth_date": birth_date,
            "gender": gender,
            "website": website,
            "subdomain": subdomain,
            "location": location,
            "newsletter": newsletter,
            "primary_usage": primary_usage,
            "timezone": timezone
        }))
439542
def update(member_address, options={})
      params = {:address => member_address}
      Mailgun.submit :put, list_member_url(member_address), params.merge(options)
    end
1014045
def pre_populate_buyer_email=(pre_populate_buyer_email)

      if !pre_populate_buyer_email.nil? && pre_populate_buyer_email.to_s.length > 254
        fail ArgumentError, "invalid value for 'pre_populate_buyer_email', the character length must be smaller than or equal to 254."
      end

      @pre_populate_buyer_email = pre_populate_buyer_email
    end
1157035
def build_contact(params = {})
      self.contact = gateway ? gateway.build_contact(params) : Contact.new(params)
    end
893897
def update(schedule_id, name: nil, enabled: nil, trigger: nil, push: nil)
      body = JPush::Schedule::SchedulePayload.new(name, trigger, push, enabled).to_update_hash
      Http::Client.put(@jpush, base_url + schedule_id, body: body)
    end
1258709
def update_info(user_id, newemail, extinfo=None):
        '''
        
        '''

        if extinfo is None:
            extinfo = {}

        out_dic = {'success': False, 'code': '00'}
        if not tools.check_email_valid(newemail):
            out_dic['code'] = '21'
            return out_dic
        cur_info = MUser.get_by_uid(user_id)
        cur_extinfo = cur_info.extinfo
        for key in extinfo:
            cur_extinfo[key] = extinfo[key]

        try:
            entry = TabMember.update(
                user_email=newemail,
                extinfo=cur_extinfo
            ).where(
                TabMember.uid == user_id
            )
            entry.execute()

            out_dic['success'] = True
        except:
            out_dic['code'] = '91'

        return out_dic
599892
def to_hash
      action = @parameters[:action]
      userid = @parameters[:userid]
      appname = @parameters[:appname] || @appname
      patientid = @parameters[:patientid]
      token = @parameters[:token] || @security_token
      parameter1 = process_date(@parameters[:parameter1]) || ''
      parameter2 = process_date(@parameters[:parameter2]) || ''
      parameter3 = process_date(@parameters[:parameter3]) || ''
      parameter4 = process_date(@parameters[:parameter4]) || ''
      parameter5 = process_date(@parameters[:parameter5]) || ''
      parameter6 = process_date(@parameters[:parameter6]) || ''
      data = Utilities::encode_data(@parameters[:data]) || ''

      {
        'Action' => action,
        'AppUserID' => userid,
        'Appname' => appname,
        'PatientID' => patientid,
        'Token' => token,
        'Parameter1' => parameter1,
        'Parameter2' => parameter2,
        'Parameter3' => parameter3,
        'Parameter4' => parameter4,
        'Parameter5' => parameter5,
        'Parameter6' => parameter6,
        'Data' => data
      }
    end
588657
function setContact( $value, $params=FALSE ) {
    $contact['value']  = $value;
    $contact['params'] = $this->_setParams( $params );
    $this->contact[] = $contact;
  }
806071
function(userObj, setname, hashPrefix, cb){

      // client.srem('users',userObj.uuid, redis.print)

      var _uuid = sha1('photopipe', userObj.email_address)
      
      client.srem(setname, _uuid, function(e,d){
        
        if(cb){
          return cb(e,d)
        } 
        
        userSetRemoveHandler(e,d)

        client.hdel(hashPrefix+':'+_uuid, userObj, userDeleteHashHandler)
        
      })
      

    }
673108
def set_user
        @user = ::Fbuser::V1::User.find_by_id(params[:id])
        if @user.nil?
          render :json => {errors: "User was not found"}, status: :not_found
        end
      end
1196786
private function setSenderInformation()
    {
        $senderName = $this->_checkoutSession->getLastRealOrder()->getCustomerName();
        // If Guest
        if (
            $senderName == (string)__('Guest')
            || $senderName == 'Convidado'
            || $senderName == 'Visitante'
                
        ) {
            $address = $this->getBillingAddress();
            $senderName = $address->getFirstname() . ' ' . $address->getLastname();
        }
        $this->_paymentRequest->setSender()->setName($senderName);
        $this->_paymentRequest->setSender()->setEmail($this->_checkoutSession
            ->getLastRealOrder()->getCustomerEmail());
        $this->setSenderPhone();
        
    }
499017
def cli(env, abuse, address1, address2, city, company, country, firstname,
        lastname, postal, public, state):
    """"""
    mgr = SoftLayer.NetworkManager(env.client)

    update = {
        'abuse_email': abuse,
        'address1': address1,
        'address2': address2,
        'company_name': company,
        'city': city,
        'country': country,
        'first_name': firstname,
        'last_name': lastname,
        'postal_code': postal,
        'state': state,
        'private_residence': public,
    }

    if public is True:
        update['private_residence'] = False
    elif public is False:
        update['private_residence'] = True

    check = [x for x in update.values() if x is not None]
    if not check:
        raise exceptions.CLIAbort(
            "You must specify at least one field to update.")

    mgr.edit_rwhois(**update)