Source: order/CreateLineItemsRequest.js

  1. /**
  2. * Autogenerated by Avro
  3. *
  4. * DO NOT EDIT DIRECTLY
  5. */
  6. var order_LineItem = require("../order/LineItem");
  7. /**
  8. * @constructor
  9. * @memberof order
  10. */
  11. var CreateLineItemsRequest = function() {
  12. this._class_ = CreateLineItemsRequest;
  13. this.items = undefined;
  14. };
  15. /**
  16. * Set the field value
  17. * List of LineItem objects to create
  18. *
  19. * @memberof order.CreateLineItemsRequest
  20. * @param {Array.<order.LineItem>} items An array of
  21. */
  22. CreateLineItemsRequest.prototype.setItems = function(items) {
  23. this.items = items;
  24. };
  25. /**
  26. * Get the field value
  27. * List of LineItem objects to create
  28. * @memberof order.CreateLineItemsRequest
  29. * @return {Array.<order.LineItem>} An array of
  30. */
  31. CreateLineItemsRequest.prototype.getItems = function() {
  32. return this.items;
  33. };
  34. /**
  35. * @memberof order.CreateLineItemsRequest
  36. * @private
  37. */
  38. CreateLineItemsRequest.prototype.getMetaInfo = function(fieldName) {
  39. var curclass = this._class_;
  40. do {
  41. var fieldMetaInfo = curclass._meta_.fields[fieldName];
  42. if(fieldMetaInfo) {
  43. return fieldMetaInfo;
  44. }
  45. if(curclass._meta_._superMeta_) {
  46. curclass = curclass._meta_._superMeta_._class_;
  47. } else {
  48. curclass = null;
  49. }
  50. } while(curclass);
  51. return null;
  52. };
  53. CreateLineItemsRequest.prototype.toString = function() {
  54. return JSON.stringify(this);
  55. };
  56. CreateLineItemsRequest._meta_ = {fields: {}};
  57. CreateLineItemsRequest._meta_._class_ = CreateLineItemsRequest;
  58. CreateLineItemsRequest._meta_.fields["items"] = {};
  59. CreateLineItemsRequest._meta_.fields["items"].type = Array;
  60. CreateLineItemsRequest._meta_.fields["items"].elementType = order_LineItem;
  61. //
  62. // Expose the module.
  63. //
  64. if ('undefined' !== typeof module) {
  65. module.exports = CreateLineItemsRequest;
  66. }