Skip to content

Commit

Permalink
Move models into their own module
Browse files Browse the repository at this point in the history
  • Loading branch information
tcd committed Jan 6, 2020
1 parent 42b49d5 commit e4b5ee6
Show file tree
Hide file tree
Showing 193 changed files with 1,117 additions and 1,075 deletions.
18 changes: 14 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## master (unreleased)
> Versions 0.x (0.2, 0.3, 0.4, ...) exist to make it easier for me to test Eddy in other projects and figure out how best to move forward with development.
>
> All code should be considered Work In Progress.
>
> While the API is still changing, enough code exists that EDI documents can currently be written with Eddy (though I wouldn't recommend use in production environments yet).
Versions 0.x (0.2, 0.3, 0.4, ...) exist to make it easier for me to test Eddy in other projects and figure out how best to move forward with development.
## feature/namespace-models (unreleased)

All code should be considered Work In Progress.
### Changed

While the API is still changing, enough code exists that EDI documents can currently be written with Eddy (though I wouldn't recommend use in production environments yet).
- Moved the following classes into the `Eddy::Models` module:
- `Element::*`
- `Segment`
- `Loop::*`
- `FunctionalGroup`
- `TransactionSet`
- `Interchange`

## 0.5.1 (2020-01-06)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 4/4
# - Description: Code indicating the hierarchical application structure of a transaction set that utilizes the HL segment to define the structure of the transaction set
class E1005 < Eddy::Element::ID
class E1005 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 3/3
# - Description: Code defining the method by which invoices are to be processed
class E1019 < Eddy::Element::ID
class E1019 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/103.packaging_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 3/5
# - Description: Code identifying the type of packaging; Part 1: Packaging Form, Part 2: Packaging Material; if the Data Element is used, then Part 1 is always required
class E103 < Eddy::Element::AN
class E103 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/2
# - Description: Code identifying a contract type
class E1166 < Eddy::Element::ID
class E1166 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/2
# - Description: Code identifying the broad category of products or services being acquired
class E1232 < Eddy::Element::ID
class E1232 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/30
# - Description: Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier
class E127 < Eddy::Element::AN
class E127 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/3
# - Description: Code qualifying the Reference Identification
class E128 < Eddy::Element::ID
class E128 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 4/4
# - Description: Code identifying the service, promotion, allowance, or charge
class E1300 < Eddy::Element::ID
class E1300 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/10
# - Description: Agency maintained code identifying the service, promotion, allowance, or charge
class E1301 < Eddy::Element::AN
class E1301 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 1/2
# - Description: Code describing the relationship of a carrier to a specific shipment movement
class E133 < Eddy::Element::ID
class E133 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/55
# - Description: Address information
class E166 < Eddy::Element::AN
class E166 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/183.volume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: R
# - Min/Max: 1/8
# - Description: Value of volumetric measure
class E183 < Eddy::Element::R
class E183 < Eddy::Models::Element::R
# @param val [Float]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/187.weight_qualifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 1/2
# - Description: Code defining the type of weight
class E187 < Eddy::Element::ID
class E187 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/19.city_name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 2/30
# - Description: Free-form text for city name
class E19 < Eddy::Element::AN
class E19 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/4
# - Description: Prefix or alphabetic part of an equipment unit's identifying number
class E206 < Eddy::Element::AN
class E206 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/207.equipment_number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/10
# - Description: Sequencing or serial part of an equipment unit's identifying number (pure numeric form for equipment number is preferred)
class E207 < Eddy::Element::AN
class E207 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/212.unit_price.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: R
# - Min/Max: 1/17
# - Description: Price per unit of product, service, commodity, etc.
class E212 < Eddy::Element::R
class E212 < Eddy::Models::Element::R
# @param val [Float]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/22.commodity_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/30
# - Description: Code describing a commodity or group of commodities
class E22 < Eddy::Element::AN
class E22 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 1/1
# - Description: Code identifying the commodity coding system used for Commodity Code
class E23 < Eddy::Element::ID
class E23 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/48
# - Description: Identifying number for a product or service
class E234 < Eddy::Element::AN
class E234 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/2
# - Description: Code identifying the type/source of the descriptive number used in Product/Service ID (234)
class E235 < Eddy::Element::ID
class E235 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 3/3
# - Description: Code identifying pricing specification
class E236 < Eddy::Element::ID
class E236 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 1/1
# - Description: Code which indicates an allowance or charge for the service specified
class E248 < Eddy::Element::ID
class E248 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/26.country_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/3
# - Description: Code identifying the country
class E26 < Eddy::Element::ID
class E26 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/2
# - Description: Code indicating the level of transportation service or the billing service offered by the transportation carrier
class E284 < Eddy::Element::ID
class E284 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/22
# - Description: Identifying number for Purchase Order assigned by the orderer/purchaser
class E324 < Eddy::Element::AN
class E324 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/45
# - Description: Reference number or RFQ number to use to identify a particular transaction set and query (additional reference number or description which can be used with contract number)
class E326 < Eddy::Element::AN
class E326 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/8
# - Description: Number assigned by the orderer identifying a specific change or revision to a previously transmitted transaction set
class E327 < Eddy::Element::AN
class E327 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/328.release_number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/30
# - Description: Number identifying a release against a Purchase Order previously placed by the parties involved in the transaction
class E328 < Eddy::Element::AN
class E328 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/330.quantity_ordered.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: R
# - Min/Max: 1/15
# - Description: Quantity ordered
class E330 < Eddy::Element::R
class E330 < Eddy::Models::Element::R
# @param val [Float]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/347.hash_total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: R
# - Min/Max: 1/10
# - Description: Sum of values of the specified data element. All values in the data element will be summed without regard to decimal points (explicit or implicit) or signs. Truncation will occur on the left most digits if the sum is greater than the maximum size of the hash total of the data element.
class E347 < Eddy::Element::R
class E347 < Eddy::Models::Element::R
# @param val [Float]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 1/1
# - Description: Code indicating the format of a description
class E349 < Eddy::Element::ID
class E349 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/352.description.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/80
# - Description: A free-form description to clarify the related data elements and their content
class E352 < Eddy::Element::AN
class E352 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/2
# - Description: Code identifying purpose of transaction set
class E353 < Eddy::Element::ID
class E353 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: N0
# - Min/Max: 1/6
# - Description: Total number of line items in the transaction set
class E354 < Eddy::Element::N
class E354 < Eddy::Models::Element::N
# @param val [Integer]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/2
# - Description: Code specifying the units in which a value is being expressed, or manner in which a measurement has been taken
class E355 < Eddy::Element::ID
class E355 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: R
# - Min/Max: 1/10
# - Description: Number of units invoiced (supplier units)
class E358 < Eddy::Element::R
class E358 < Eddy::Models::Element::R
# @param val [Float]
# @param req [String]
# @param ref [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/367.contract_number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: AN
# - Min/Max: 1/30
# - Description: Contract number
class E367 < Eddy::Element::AN
class E367 < Eddy::Models::Element::AN
# @param val [String]
# @param req [String]
# @param ref [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 2/2
# - Description: Code indicating the status of an order or shipment or the disposition of any difference between the quantity ordered and the quantity shipped for a line item or transaction
class E368 < Eddy::Element::ID
class E368 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: ID
# - Min/Max: 3/3
# - Description: Code specifying type of date or time, or both date and time
class E374 < Eddy::Element::ID
class E374 < Eddy::Models::Element::ID

# @param val [String]
# @param req [String]
Expand Down
2 changes: 1 addition & 1 deletion lib/definitions/elements/generated/380.quantity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Elements
# - Type: R
# - Min/Max: 1/15
# - Description: Numeric value of quantity
class E380 < Eddy::Element::R
class E380 < Eddy::Models::Element::R
# @param val [Float]
# @param req [String]
# @param ref [String]
Expand Down
Loading

0 comments on commit e4b5ee6

Please sign in to comment.