Source: payments/PaymentResponse.js

  1. /**
  2. * Autogenerated by Avro
  3. *
  4. * DO NOT EDIT DIRECTLY
  5. */
  6. var payments_Payment = require("../payments/Payment");
  7. /**
  8. * @constructor
  9. * @memberof payments
  10. */
  11. var PaymentResponse = function() {
  12. this._class_ = PaymentResponse;
  13. this.requestSuccessful = undefined;
  14. this.responseErrorMessage = undefined;
  15. this.payment = undefined;
  16. this.clientData = undefined;
  17. this.syncPaymentObject = undefined;
  18. };
  19. /**
  20. * Set the field value
  21. * @memberof payments.PaymentResponse
  22. * @param {Boolean} requestSuccessful
  23. */
  24. PaymentResponse.prototype.setRequestSuccessful = function(requestSuccessful) {
  25. this.requestSuccessful = requestSuccessful;
  26. };
  27. /**
  28. * Get the field value
  29. * @memberof payments.PaymentResponse
  30. * @return {Boolean}
  31. */
  32. PaymentResponse.prototype.getRequestSuccessful = function() {
  33. return this.requestSuccessful;
  34. };
  35. /**
  36. * Set the field value
  37. * @memberof payments.PaymentResponse
  38. * @param {String|Null} responseErrorMessage
  39. */
  40. PaymentResponse.prototype.setResponseErrorMessage = function(responseErrorMessage) {
  41. this.responseErrorMessage = responseErrorMessage;
  42. };
  43. /**
  44. * Get the field value
  45. * @memberof payments.PaymentResponse
  46. * @return {String|Null}
  47. */
  48. PaymentResponse.prototype.getResponseErrorMessage = function() {
  49. return this.responseErrorMessage;
  50. };
  51. /**
  52. * Set the field value
  53. * @memberof payments.PaymentResponse
  54. * @param {payments.Payment|Null} payment
  55. */
  56. PaymentResponse.prototype.setPayment = function(payment) {
  57. this.payment = payment;
  58. };
  59. /**
  60. * Get the field value
  61. * @memberof payments.PaymentResponse
  62. * @return {payments.Payment|Null}
  63. */
  64. PaymentResponse.prototype.getPayment = function() {
  65. return this.payment;
  66. };
  67. /**
  68. * Set the field value
  69. * Additional data sent back from the gateway
  70. *
  71. * @memberof payments.PaymentResponse
  72. * @param {Object.<String,String>} clientData A map of <String> to <>
  73. */
  74. PaymentResponse.prototype.setClientData = function(clientData) {
  75. this.clientData = clientData;
  76. };
  77. /**
  78. * Get the field value
  79. * Additional data sent back from the gateway
  80. * @memberof payments.PaymentResponse
  81. * @return {Object.<String,String>} A map of <String> to <>
  82. */
  83. PaymentResponse.prototype.getClientData = function() {
  84. return this.clientData;
  85. };
  86. /**
  87. * Set the field value
  88. * @memberof payments.PaymentResponse
  89. * @param {Boolean} syncPaymentObject
  90. */
  91. PaymentResponse.prototype.setSyncPaymentObject = function(syncPaymentObject) {
  92. this.syncPaymentObject = syncPaymentObject;
  93. };
  94. /**
  95. * Get the field value
  96. * @memberof payments.PaymentResponse
  97. * @return {Boolean}
  98. */
  99. PaymentResponse.prototype.getSyncPaymentObject = function() {
  100. return this.syncPaymentObject;
  101. };
  102. /**
  103. * @memberof payments.PaymentResponse
  104. * @private
  105. */
  106. PaymentResponse.prototype.getMetaInfo = function(fieldName) {
  107. var curclass = this._class_;
  108. do {
  109. var fieldMetaInfo = curclass._meta_.fields[fieldName];
  110. if(fieldMetaInfo) {
  111. return fieldMetaInfo;
  112. }
  113. if(curclass._meta_._superMeta_) {
  114. curclass = curclass._meta_._superMeta_._class_;
  115. } else {
  116. curclass = null;
  117. }
  118. } while(curclass);
  119. return null;
  120. };
  121. PaymentResponse.prototype.toString = function() {
  122. return JSON.stringify(this);
  123. };
  124. PaymentResponse._meta_ = {fields: {}};
  125. PaymentResponse._meta_._class_ = PaymentResponse;
  126. PaymentResponse._meta_.fields["requestSuccessful"] = {};
  127. PaymentResponse._meta_.fields["requestSuccessful"].type = Boolean;
  128. PaymentResponse._meta_.fields["responseErrorMessage"] = {};
  129. PaymentResponse._meta_.fields["responseErrorMessage"].type = String;
  130. PaymentResponse._meta_.fields["payment"] = {};
  131. PaymentResponse._meta_.fields["payment"].type = payments_Payment;
  132. PaymentResponse._meta_.fields["clientData"] = {};
  133. PaymentResponse._meta_.fields["clientData"].type = Object;
  134. PaymentResponse._meta_.fields["syncPaymentObject"] = {};
  135. PaymentResponse._meta_.fields["syncPaymentObject"].type = Boolean;
  136. //
  137. // Expose the module.
  138. //
  139. if ('undefined' !== typeof module) {
  140. module.exports = PaymentResponse;
  141. }