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

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,733
Latest member
LonaMonzon

Latest Threads

Top