{"id":21765947,"url":"https://github.com/narazaka/jx_client","last_synced_at":"2025-07-08T23:35:02.283Z","repository":{"id":56879770,"uuid":"426607434","full_name":"Narazaka/jx_client","owner":"Narazaka","description":"日本におけるインターネットEDI（電子データ交換）において利用されるJX手順通信ライブラリ","archived":false,"fork":false,"pushed_at":"2021-11-11T07:14:36.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T22:52:58.489Z","etag":null,"topics":["edi","jx","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Narazaka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-10T12:06:39.000Z","updated_at":"2024-05-10T15:55:36.000Z","dependencies_parsed_at":"2022-08-20T11:40:43.474Z","dependency_job_id":null,"html_url":"https://github.com/Narazaka/jx_client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narazaka%2Fjx_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narazaka%2Fjx_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narazaka%2Fjx_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narazaka%2Fjx_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Narazaka","download_url":"https://codeload.github.com/Narazaka/jx_client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244741502,"owners_count":20502292,"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":["edi","jx","ruby"],"created_at":"2024-11-26T13:14:33.457Z","updated_at":"2025-03-21T05:22:51.491Z","avatar_url":"https://github.com/Narazaka.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JxClient\n\n日本におけるインターネットEDI（電子データ交換）において利用されるJX手順通信ライブラリ\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'jx_client'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install jx_client\n\n## Usage\n\n```ruby\nrequire \"jx_client\"\n\nclient = JxClient.new(\n  jx_version: 2007,\n  jx_message_id_generate: -\u003e { \"#{SecureRandom.hex}@example.com\" },\n  jx_timestamp_generate: true,\n  jx_default_options: {\n    from: \"sender.example.com\",\n  },\n  endpoint: \"receiver.example.com\", # Savon options\n)\n\nclient.put_document do |op|\n  op.options(\n    to: \"receiver.example.com\",\n    data: \"123,なにか,456\\n\",\n    sender_id: \"10001\",\n    receiver_id: \"10002\",\n    format_type: \"SecondGenEDI\",\n    document_type: \"Order\",\n  )\n  MyPutDocumentStore.mark_sending(op.sent_options)\n  count = 0\n  begin\n    count += 1\n    op.call\n  rescue Savon::Error\n    retry if count \u003c 4\n    raise\n  end\n  MyPutDocumentStore.mark_sent(op.sent_options)\nend\n\nget_document = client.get_document do |op|\n  op.options(\n    to: \"receiver.example.com\",\n    receiver_id: \"10001\",\n  )\n  count = 0\n  begin\n    count += 1\n    op.call\n  rescue Savon::Error\n    retry if count \u003c 4\n    raise\n  end\n  MyGetDocumentStore.mark_received(op.response.result)\n  MyApp.receive_document(op.response.result)\n  MyGetDocumentStore.mark_app_processed(op.response.result)\nend\n\nclient.confirm_document do |op|\n  op.options(\n    to: \"receiver.example.com\",\n    sender_id: \"10001\",\n    receiver_id: \"10002\",\n    message_id: get_document.result.message_id,\n  )\n  count = 0\n  begin\n    count += 1\n    op.call\n  rescue Savon::Error\n    retry if count \u003c 4\n    raise\n  end\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Narazaka/jx_client.\n\n## License\n\nThis is released under [Zlib License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarazaka%2Fjx_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarazaka%2Fjx_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarazaka%2Fjx_client/lists"}