def main(): """ optin_signup apexはOptinStatus__cをtrueにして、その後の値を返す """ args = sys.argv check_args(args, 1) account_id = args[1] msf = LibMtSalesForce() api_path = 'optin/signup/pm/?id=%s' % (account_id) payload = {} response = msf.apexecute(api_path, method='GET', data=payload) p(response) return response
def main(): """ AccountIDを指定して、Account情報を取得する """ # https://cs6.salesforce.com/services/apexrest/account/with_relations/?id=001N000001HsLSUIA3 args = sys.argv check_args(args, 1) account_id = args[1] msf = LibMtSalesForce() api_path = 'account/with_relations?id=%s' % (account_id) payload = {} response = msf.apexecute(api_path, method='GET', data=payload) p("Debug:") p(response) return response
def main(): """ Account作成 """ # TODO: パラメータでjson取得 # dev ダミーデータ file = open('./data/post_apex_account_create.json', 'r') data = json.load(file) # args = sys.argv # check_args(args, 0) msf = LibMtSalesForce() api_path = 'account/create_with_relations/' payload = data response = msf.apexecute(api_path, method='POST', data=data) p(response) # 001N000001ypTXaIAM return response
def main(): """ """ # TODO: パラメータでjson取得 # dev ダミーデータ file = open('./data/post_apex_question.json', 'r') data = json.load(file) # args = sys.argv # check_args(args, 0) msf = LibMtSalesForce() api_path = 'simple_questionnaire/question/updater/' payload = data response = msf.apexecute(api_path, method='POST', data=data) p(response) return response
def main(): """ Pointの更新 id:001N000001HsLSUIA3 displacement:-100 // 変更する値 (現在のポイントから-100)とか bikou: Amazon """ args = sys.argv check_args(args, 3) msf = LibMtSalesForce() api_path = 'accountpoint/?id=%s&displacement=%s&bikou=%s' % ( args[1], args[2], args[3]) payload = {} response = msf.apexecute(api_path, method='GET', data=payload) p(response) return response