FuelSDK-Ruby icon indicating copy to clipboard operation
FuelSDK-Ruby copied to clipboard

FuelSDk is showing Error message while sending a POST request

Open puneetgaurr opened this issue 7 years ago • 3 comments

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 avatar Oct 12 '17 19:10 puneetgaurr

Hi Team,

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

puneetgaurr avatar Oct 13 '17 01:10 puneetgaurr

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

Gokul595 avatar Oct 13 '17 03:10 Gokul595

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

puneetgaurr avatar Oct 13 '17 07:10 puneetgaurr