Class: RsrGroup::OrderFFL

Inherits:
Base
  • Object
show all
Defined in:
lib/rsr_group/order_ffl.rb

Constant Summary

Constants inherited from Base

Base::DEFAULT_CATALOG_FILENAME, Base::DEFAULT_DIR, Base::KEYDEALER_CATALOG_FILENAME, Base::KEYDEALER_DIR, Base::MAP_FILENAME, Base::QTY_FILENAME

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

connect

Constructor Details

#initialize(options = {}) ⇒ OrderFFL

Returns a new instance of OrderFFL.



6
7
8
9
10
11
# File 'lib/rsr_group/order_ffl.rb', line 6

def initialize(options = {})
  requires!(options, :order_identifier, :license_number, :name, :zip, :end_customer_name, :end_customer_phone)

  @options = options
  @order_identifier = options[:order_identifier]
end

Instance Attribute Details

#order_identifierObject (readonly)

Returns the value of attribute order_identifier.



4
5
6
# File 'lib/rsr_group/order_ffl.rb', line 4

def order_identifier
  @order_identifier
end

Instance Method Details

#to_single_lineObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rsr_group/order_ffl.rb', line 13

def to_single_line
  [
    order_identifier,
    LINE_TYPES.key(:ffl_dealer),
    @options[:license_number],
    @options[:name],
    @options[:zip],
    @options[:end_customer_name],
    @options[:end_customer_phone]
  ].join(";")
end