def get_resource(self):
     """Get the resource sent via the webhook event, e.g. Authorization, conveniently
      wrapped in the corresponding paypalrestsdk class
     """
     webhook_resource_type = self.resource_type
     klass = util.get_member(webhook_resource_type)
     resource = klass(self.resource.__dict__)
     return resource
Exemple #2
0
 def get_resource(self):
     """Get the resource sent via the webhook event, e.g. Authorization, conveniently
      wrapped in the corresponding paypalrestsdk class
     """
     webhook_resource_type = self.resource_type
     klass = util.get_member(webhook_resource_type)
     resource = klass(self.resource.__dict__)
     return resource
 def test_get_member(self):
     klass = util.get_member('authorization')
     self.assertEqual(klass, Authorization)
 def test_get_member(self):
     klass = util.get_member('authorization')
     self.assertEqual(klass, Authorization)