Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

FuelSDk is showing Error message while sending a POST request #79

Open
puneetgaurr opened this issue Oct 12, 2017 · 3 comments
Open

FuelSDk is showing Error message while sending a POST request #79

puneetgaurr opened this issue Oct 12, 2017 · 3 comments

Comments

@puneetgaurr
Copy link

Hi Team,

I have created one Email Data Extension object in Marketing Cloud which have below fields-

Object Name: books

bookid text . (Primary Key)
name text
description text

I am trying to post data from Ruby code with FuelSDK Gem but getting below error message evry time while post

Error Message : TypeError (no implicit conversion of String into Integer)

Please find the below line of code for the same-

dataextension = FuelSDK::DataExtension::Row.new

dataextension.authStub = myClient
dataextension.Name = 'books'
dataextension.CustomerKey='booksdetail'
dataextension.props = {'boodid' => 'S1234', 'name' => 'MyBookDetails', 'description' => 'Hello'}

results = dataextension.post

I am getting this error on dataextension.post. Please let me know what I doing mistake here.

@puneetgaurr
Copy link
Author

Hi Team,

It's my humble request to resolve this issue. I am unable to use this Gem file.

@Gokul595
Copy link

Gokul595 commented Oct 13, 2017

Try this:

data_extension_row = MarketingCloudSDK::DataExtension::Row.new
data_extension_row.client = {
    client: {
        id: ENV['MC_CLIENT_ID'],
        secret: ENV['MC_CLIENT_SECRET']
    }
}.as_json
data_extension_row.name = 'books'
data_extension_row.props = { bookid: 'S1234', name: 'MyBookDetails', description: 'Hello' }

response = data_extension_row.post
response.results

@puneetgaurr
Copy link
Author

Thanks Gokul. Now I'm getting different error message while data_extension_row.post i.e "undefined method `soap_get' for #Hash:0x007fe9d5d6d370)".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants