Have accessor var= still undefined

D

dpenney

So here is the snippet that defines the DoDirectPaymentRequestType
(this is all trying to use the PayPal API)

# {urn:ebay:api:payPalAPI}DoDirectPaymentRequestType
class DoDirectPaymentRequestType
@@schema_type = "DoDirectPaymentRequestType"
@@schema_ns = "urn:ebay:api:payPalAPI"
@@schema_element = [
["detailLevel", ["DetailLevelCodeType[]",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "DetailLevel")]],
["errorLanguage", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "ErrorLanguage")]],
["messageID", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "MessageID")]],
["version", ["SOAP::SOAPString",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents", "Version")]],
["any", [nil, XSD::QName.new("http://www.w3.org/2001/XMLSchema",
"anyType")]],
["doDirectPaymentRequestDetails",
["DoDirectPaymentRequestDetailsType",
XSD::QName.new("urn:ebay:apis:eBLBaseComponents",
"DoDirectPaymentRequestDetails")]]
]

attr_accessor :detailLevel
attr_accessor :errorLanguage
attr_accessor :messageID
attr_accessor :version
attr_reader :__xmlele_any
attr_accessor :doDirectPaymentRequestDetails


The code to access it is

def Paypal.directauth(params,live=nil)
client = create_client(live)

directreq = DoDirectPaymentReq.new
drtype = DoDirectPaymentRequestType.new
directreq.doDirectPaymentRequest = drtype
drtype.version= "2.0"
dtype = DoDirectPaymentRequestDetailsType.new
dtype.iPAddress = params[:ip]


But all I get is

test_failed_authorization(PaypalTest):
NoMethodError: undefined method `version=' for
#<DoDirectPaymentRequestType:0x3a
20c60>
C:/ruby/store/vendor/plugins/paypal/test/../lib/paypal.rb:186:in
`directauth
'

What am I doing wrong here?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top