{"id":16925445,"url":"https://github.com/alejandrodevs/iso-8583","last_synced_at":"2025-04-11T17:27:38.029Z","repository":{"id":32251575,"uuid":"35825916","full_name":"alejandrodevs/iso-8583","owner":"alejandrodevs","description":"ISO 8583 Financial Messaging for Ruby","archived":false,"fork":false,"pushed_at":"2015-05-26T22:39:46.000Z","size":236,"stargazers_count":8,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T13:21:15.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alejandrodevs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-18T15:27:25.000Z","updated_at":"2020-10-09T07:35:54.000Z","dependencies_parsed_at":"2022-09-11T07:01:52.144Z","dependency_job_id":null,"html_url":"https://github.com/alejandrodevs/iso-8583","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fiso-8583","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fiso-8583/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fiso-8583/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fiso-8583/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandrodevs","download_url":"https://codeload.github.com/alejandrodevs/iso-8583/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248449027,"owners_count":21105406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T20:10:39.387Z","updated_at":"2025-04-11T17:27:38.003Z","avatar_url":"https://github.com/alejandrodevs.png","language":"Ruby","readme":"# ISO 8583\n[![Build Status](https://travis-ci.org/alejandrogutierrez/iso-8583.png?branch=master)](https://travis-ci.org/alejandrogutierrez/iso-8583) [![Coverage Status](https://coveralls.io/repos/alejandrogutierrez/iso-8583/badge.svg?branch=master)](https://coveralls.io/r/alejandrogutierrez/iso-8583?branch=master)\n\nISO 8583 Financial Messaging for Ruby. This gem aims to provide a easy\nand simple way to encode and decode ISO 8583 Financial Messages.\n\n\n## Installation\nAdd this line to your Gemfile:\n```ruby\ngem 'iso-8583'\n```\nRun the bundle command to install it.\n\n\n## Usage\n### Decoding a ISO 8583 message\n```ruby\nrequire 'iso8583'\n\nmessage = ISO8583::Message.new('ISO02110005508100220000002000000082108321601579500301')\n\n# Getting properties.\nmessage.header  # =\u003e \u003cISO8583::Header:0x007fe7a33ac4c8 @data=\"ISO021100055\"\u003e\nmessage.mti     # =\u003e \u003cISO8583::MTI:0x007fe7a33ac428 @data=\"0810\"\u003e\nmessage.bitmap  # =\u003e \u003cISO8583::Bitmap:0x007fe7a33ac388 @data=\"0220000002000000\"\u003e\nmessage.data    # =\u003e \u003cISO8583::Data:0x007fe7a33ac360 @data=\"082108321601579500301\"\u003e\n\n# Getting fields.\nmessage.fields.ids        # =\u003e [7, 11, 39]\nmessage.fields[7]         # =\u003e \u003cISO8583::Field:0x007fe7a31a2da8\u003e\nmessage.fields[7].id      # =\u003e 7\nmessage.fields[7].data    # =\u003e \"0821083216\"\nmessage.fields[7].value   # =\u003e \"0821083216\"\nmessage.fields[7].length  # =\u003e 10\nmessage.fields[7].codec   # =\u003e /^[0-9]*$/\nmessage.fields[7].type    # =\u003e \u003cISO8583::FieldType:0x007ffaf9a86528\u003e\n```\n\n### Encoding a ISO 8583 message\n```ruby\nrequire 'iso8583'\n\nmessage = ISO8583::Message.new\n\n# Setting properties.\nmessage.header = 'ISO021100055' #Optional\nmessage.mti = '0810'\n\n# Adding fields.\nmessage.set_field(7, '0821083216')  # =\u003e \u003cISO8583::Field:0x007fe7a33552e0\u003e\nmessage.set_field(11, '015795')     # =\u003e \u003cISO8583::Field:0x007fe7a3355268\u003e\nmessage.set_field(39, '00')         # =\u003e \u003cISO8583::Field:0x007fe7a3355218\u003e\n\n# Deleting fields.\nmessage.unset_field(11)   # =\u003e 11\nmessage.unset_field(39)   # =\u003e 39\n\n# Getting full message.\nmessage.bitmap  # =\u003e \u003cISO8583::Bitmap:0x007fe7a33ac388 @data=\"0200000000000000\"\u003e\nmessage.to_s    # =\u003e \"ISO021100055081002000000000000000821083216\"\n```\n\n### Exceptions\n```ruby\nrequire 'iso8583'\n\nmessage = ISO8583::Message.new\n\n# Raising exceptions.\nmessage.mti = '02000'     # =\u003e ISO8583::ISO8583LengthException: Must have length == 4\nmessage.mti = '020A'      # =\u003e ISO8583::ISO8583CodecException: Must match /^[0-9]*$/\nmessage.header = 'ISO02'  # =\u003e ISO8583::ISO8583LengthException: Must have length == 12\n\n# ISO 8583 defines that data element 11 must be numeric and have length of 6.\nmessage.set_field(11, '01579A') # =\u003e ISO8583::ISO8583CodecException: Must match /^[0-9]*$/\nmessage.set_field(11, '01579')  # =\u003e ISO8583::ISO8583LengthException: Must have length == 6\nmessage.set_field(11, '015795') # =\u003e OK\n```\n\n\n## Contributing\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new pull request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrodevs%2Fiso-8583","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandrodevs%2Fiso-8583","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrodevs%2Fiso-8583/lists"}