app/services/test_economy_management/invite.rb
def update_contacts_if_required

      return success if @email_arr.length == 1 && @manager[:email] == @email_arr[0] # Not to be done on self invite

      return success unless GlobalConstant::Base.sandbox_sub_environment?   # Attribute to be set only in testnet

      client_id = @token[:client_id]

      client = CacheManagement::Client.new([client_id]).fetch[client_id]

      return success if client[:sandbox_statuses].present? && client[:sandbox_statuses].include?(GlobalConstant::Client.sandbox_ost_wallet_invited_users_property)

      update_campaign_attributes({
                                     entity_id: client_id,
                                     entity_kind: GlobalConstant::EmailServiceApiCallHook.client_receiver_entity_kind,
                                     attributes: { GlobalConstant::PepoCampaigns.ost_wallet_invited_users =>  GlobalConstant::PepoCampaigns.attribute_set },
                                     settings: {},
                                     mile_stone: GlobalConstant::PepoCampaigns.ost_wallet_invited_users
                                 })
    end
# Update attributes in pepo campaigns if required
#
# * Author: Santhosh
# * Date: 17/07/2019
# * Reviewed By:
#
# @return [Result::Base]
#
Update attributes in pepo campaigns if required
Author: Santhosh
Date: 17/07/2019
Reviewed By.
Update attributes in pepo campaigns if required Author : Santhosh Date : 17 / 07 / 2019 Reviewed By .
def update_contacts_if_required
      return success if @email_arr.length == 1 && @manager[:email] == @email_arr[0] 
      return success unless GlobalConstant::Base.sandbox_sub_environment?   
      client_id = @token[:client_id]
      client = CacheManagement::Client.new([client_id]).fetch[client_id]
      return success if client[:sandbox_statuses].present? && client[:sandbox_statuses].include?(GlobalConstant::Client.sandbox_ost_wallet_invited_users_property)
      update_campaign_attributes({
                                     entity_id: client_id,
                                     entity_kind: GlobalConstant::EmailServiceApiCallHook.client_receiver_entity_kind,
                                     attributes: { GlobalConstant::PepoCampaigns.ost_wallet_invited_users =>  GlobalConstant::PepoCampaigns.attribute_set },
                                     settings: {},
                                     mile_stone: GlobalConstant::PepoCampaigns.ost_wallet_invited_users
                                 })
    end
def update_contacts_if_required return success if @email_arr . length == 1 && @manager [ :email ] == @email_arr [ 0 ] return success unless GlobalConstant :: Base . sandbox_sub_environment? client_id = @token [ :client_id ] client = CacheManagement :: Client . new ( [ client_id ] ) . fetch [ client_id ] return success if client [ :sandbox_statuses ] . present? && client [ :sandbox_statuses ] . include? ( GlobalConstant :: Client . sandbox_ost_wallet_invited_users_property ) update_campaign_attributes ( { entity_id : client_id , entity_kind : GlobalConstant :: EmailServiceApiCallHook . client_receiver_entity_kind , attributes : { GlobalConstant :: PepoCampaigns . ost_wallet_invited_users => GlobalConstant :: PepoCampaigns . attribute_set } , settings : { } , mile_stone : GlobalConstant :: PepoCampaigns . ost_wallet_invited_users } ) end
Update attributes in pepo campaigns if required
 Author: Santhosh
 Date: 17/07/2019
 Reviewed By:
Update attributes in pepo campaigns if required Author : Santhosh Date : 17 / 07 / 2019 Reviewed By :
# Not to be done on self invite # Attribute to be set only in testnet
None
Result::Base