Class: FTF::Records::Product

Inherits:
Base
  • Object
show all
Defined in:
lib/ftf/records/product.rb

Instance Attribute Summary

Attributes inherited from Base

#data, #index

Instance Method Summary collapse

Methods inherited from Base

#initialize, #padding, #render

Constructor Details

This class inherits a constructor from FTF::Records::Base

Instance Method Details

#fieldsObject

rubocop:disable Metrics/AbcSize,Metrics/MethodLength



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/ftf/records/product.rb', line 10

def fields # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
  {
    action: data.action,
    fiscal_id: data.file.fiscal_id,
    record_index: padding(index, 10),
    type: padding(data.type, 2),
    id_type: padding(data.id_type, 2),
    id: padding(data.id, 38),
    created_at: padding(data.created_at, 8),
    canceled_at: padding(data.canceled_at, 8),
    transfered_at: padding(data.transfered_at, 8),
    transfered_entity_id: padding(data.transfered_entity_id, 20),
    lease_type: padding(data.lease_type, 1),
    lease_period: padding(data.lease_period, 4),
    reserved_field: " " * 137
  }
end

#identifierObject



6
7
8
# File 'lib/ftf/records/product.rb', line 6

def identifier
  "10"
end