app/models/user_decorator.rb
def assign_mailchimp_subscriber_id
    begin
      response = gibbon.list_member_info({:id => mailchimp_list_id, :email_address => [self.email]}).with_indifferent_access

      if response[:success] == 1
        member = response[:data][0]

        self.mailchimp_subscriber_id = member[:id]
      end
    rescue  => ex
      Exceptional.handle ex 
      logger.warn "SpreeMailChimp: Failed to retrieve and store Mailchimp ID: #{ex.message}"
    end
  end
# Retrieves and stores the Mailchimp member id
#
# Returns the Mailchimp ID
Retrieves and stores the Mailchimp member id
Returns the Mailchimp ID
Retrieves and stores the Mailchimp member id Returns the Mailchimp ID
def assign_mailchimp_subscriber_id
    begin
      response = gibbon.list_member_info({:id => mailchimp_list_id, :email_address => [self.email]}).with_indifferent_access
      if response[:success] == 1
        member = response[:data][0]
        self.mailchimp_subscriber_id = member[:id]
      end
    rescue  => ex
      Exceptional.handle ex 
      logger.warn "SpreeMailChimp: Failed to retrieve and store Mailchimp ID: #{ex.message}"
    end
  end
def assign_mailchimp_subscriber_id begin response = gibbon . list_member_info ( { :id => mailchimp_list_id , :email_address => [ self . email ] } ) . with_indifferent_access if response [ :success ] == 1 member = response [ :data ] [ 0 ] self . mailchimp_subscriber_id = member [ :id ] end rescue => ex Exceptional . handle ex logger . warn "SpreeMailChimp: Failed to retrieve and store Mailchimp ID: #{ex.message}" end end
Retrieves and stores the Mailchimp member id
Returns the Mailchimp ID
Retrieves and stores the Mailchimp member id Returns the Mailchimp ID