Class: Agris::Api::NewVoucher
- Inherits:
-
Object
- Object
- Agris::Api::NewVoucher
- Includes:
- XmlModel
- Defined in:
- lib/agris/api/new_voucher.rb
Defined Under Namespace
Classes: GeneralLedgerDetail, InventoryItemDetail
Constant Summary collapse
- ATTRIBUTE_NAMES =
%w( agent_id currency_code discount_amount discount_date doc_type due_date exchange_rate exchange_rate_date first_voucher_no name_id_type original_date record_type remark_value remit_to_id ship_from_id shipper_id state_county terms_code their_invoice_no their_order_no trancode_1 trancode_2 trancode_3 trancode_4 trancode_5 trans_status usr_order_field_1 usr_order_field_2 voucher_amount voucher_date voucher_description voucher_location voucher_number voucher_type ).freeze
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
Instance Method Summary collapse
- #add_detail(voucher) ⇒ Object
-
#initialize(hash = {}) ⇒ NewVoucher
constructor
A new instance of NewVoucher.
- #xml_ignore_attributes ⇒ Object
Methods included from XmlModel
Constructor Details
#initialize(hash = {}) ⇒ NewVoucher
Returns a new instance of NewVoucher.
49 50 51 52 53 54 |
# File 'lib/agris/api/new_voucher.rb', line 49 def initialize(hash = {}) super @details = [] @record_type = 'ACPV0' end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
8 9 10 |
# File 'lib/agris/api/new_voucher.rb', line 8 def details @details end |
Instance Method Details
#add_detail(voucher) ⇒ Object
56 57 58 |
# File 'lib/agris/api/new_voucher.rb', line 56 def add_detail(voucher) @details << voucher end |
#xml_ignore_attributes ⇒ Object
60 61 62 |
# File 'lib/agris/api/new_voucher.rb', line 60 def xml_ignore_attributes [:details] end |