rms_item_api 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +6 -2
- data/.travis.yml +10 -2
- data/README.md +19 -10
- data/Rakefile +7 -3
- data/config/response_codes.yml +15 -0
- data/lib/rms_item_api/helper.rb +139 -0
- data/lib/rms_item_api/item/delete.rb +14 -0
- data/lib/rms_item_api/item/get.rb +11 -0
- data/lib/rms_item_api/item/insert.rb +14 -0
- data/lib/rms_item_api/item/update.rb +14 -0
- data/lib/rms_item_api/item.rb +4 -0
- data/lib/rms_item_api/version.rb +1 -1
- data/lib/rms_item_api.rb +13 -119
- data/rms_item_api.gemspec +8 -6
- metadata +68 -38
- data/.rspec +0 -2
- data/Gemfile.lock +0 -75
- data/bin/console +0 -14
- data/bin/setup +0 -7
- data/config/field_name.yml +0 -63
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 027ea98e0b732bbaf22dfc40810744e5a3cb004a
|
4
|
+
data.tar.gz: f2c0dd80efb003e3282a14fdacc9d5b4e22232b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7437444ce8de6cd34266cca4cf7df0254a6e6a86115a7298df31c8e084cff2fda32403fbc5e194464d9a7edbb8cb9ddfeaeb8242753fa539a0389acbd5ef47c
|
7
|
+
data.tar.gz: 2c61e7520997ab46d410da2354e778d64fdd398918e444613772164ffe953f3b46bf5aa82bf1f121fcfd92c618ed1dd18b2fa177aca698039977825549c8e1eb
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -4,20 +4,21 @@
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'rms_item_api'
|
9
11
|
```
|
10
12
|
## Usage
|
11
13
|
|
12
|
-
取得や更新する項目に関しては楽天RMS WEB API
|
13
|
-
https://webservice.rms.rakuten.co.jp/merchant-portal/view?page=document0002
|
14
|
+
取得や更新する項目に関しては楽天RMS WEB APIのドキュメント「拡張サービス一覧>WEB APIサービス>RMS WEB SERVICE : ItemAPI」(要ログイン)にて。
|
14
15
|
|
15
16
|
### Initialize
|
16
17
|
|
17
|
-
RMS
|
18
|
+
RMS内の「拡張サービス一覧>WEB APIサービス>利用設定」にあるserviceSecretとlicenseKeyが必要です(事前にWEB APIの利用申し込みが必要です)。
|
18
19
|
|
19
20
|
```ruby
|
20
|
-
client = RmsItemApi::
|
21
|
+
client = RmsItemApi::Client.new(
|
21
22
|
serviceSecret: "your_serviceSecret",
|
22
23
|
licenseKey: "your_licenseKey"
|
23
24
|
)
|
@@ -25,20 +26,25 @@ client = RmsItemApi::RmsItemApi.new(
|
|
25
26
|
|
26
27
|
### Get
|
27
28
|
|
28
|
-
|
29
|
+
RMSに登録している商品情報を商品管理番号を指定して取得することができます。
|
29
30
|
|
30
31
|
```ruby
|
31
32
|
item = client.get('test123')
|
32
33
|
|
34
|
+
# 正常なレスポンスが返ってきているかをtrue/falseで返します
|
35
|
+
item.is_success?
|
36
|
+
|
33
37
|
# 商品名を取得
|
34
38
|
item.item_name
|
35
39
|
# 表示価格を取得
|
36
40
|
item.item_price
|
41
|
+
# 全ての取得データをhashで出力します
|
42
|
+
item.all
|
37
43
|
```
|
38
44
|
|
39
45
|
### Insert
|
40
46
|
|
41
|
-
|
47
|
+
RMSに商品情報を登録することができます。
|
42
48
|
|
43
49
|
```ruby
|
44
50
|
item = client.insert({
|
@@ -54,11 +60,14 @@ item = client.insert({
|
|
54
60
|
item_layout: 2,
|
55
61
|
is_included_postage: true
|
56
62
|
})
|
63
|
+
|
64
|
+
# 正常なレスポンスが返ってきているかをtrue/falseで返します
|
65
|
+
item.is_success?
|
57
66
|
```
|
58
67
|
|
59
68
|
### Update
|
60
69
|
|
61
|
-
|
70
|
+
RMSに登録されている商品情報を更新することができます。
|
62
71
|
|
63
72
|
```ruby
|
64
73
|
item = client.update({
|
@@ -75,7 +84,7 @@ item = client.update({
|
|
75
84
|
|
76
85
|
### Delete
|
77
86
|
|
78
|
-
|
87
|
+
RMSに登録されている商品情報を削除することができます。
|
79
88
|
|
80
89
|
```ruby
|
81
90
|
item = client.delete({
|
data/Rakefile
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
require "
|
2
|
+
require "rake/testtask"
|
3
3
|
|
4
|
-
|
4
|
+
Rake::TestTask.new(:test) do |t|
|
5
|
+
t.libs << "test"
|
6
|
+
t.libs << "lib"
|
7
|
+
t.test_files = FileList['test/**/*_test.rb']
|
8
|
+
end
|
5
9
|
|
6
|
-
task :default => :
|
10
|
+
task :default => :test
|
@@ -0,0 +1,15 @@
|
|
1
|
+
N000: 正常に処理が終了しました。
|
2
|
+
S001: 只今メンテナンス中のためアクセスできません。
|
3
|
+
S002: 只今メンテナンス中のためアクセスできません。
|
4
|
+
S011: システムエラー
|
5
|
+
S021: システムエラー
|
6
|
+
S031: システムエラー
|
7
|
+
S999: システムエラー
|
8
|
+
C001: 該当する商品IDは存在しません。
|
9
|
+
C011: 指定された店舗IDは存在しません。
|
10
|
+
C113: パラメータがフォーマットにそっていません。
|
11
|
+
C114: 商品一括登録サービスにロックされているため操作できません。
|
12
|
+
C201: 指定されたイベントIDは存在しません。
|
13
|
+
C204: 商品IDのフォーマットが正しくありません。
|
14
|
+
C219: 不要なデータが入っています。
|
15
|
+
C301: 登録・更新・削除時 渡されたtransactionIDでの更新が既にされています。
|
@@ -0,0 +1,139 @@
|
|
1
|
+
module RmsItemApi
|
2
|
+
module Helper
|
3
|
+
|
4
|
+
ENDPOINT = 'https://api.rms.rakuten.co.jp/es/1.0/item/'.freeze
|
5
|
+
def connection(method)
|
6
|
+
Faraday.new(url: ENDPOINT + method) do |conn|
|
7
|
+
conn.adapter(Faraday.default_adapter)
|
8
|
+
conn.headers['Authorization'] = encoded_key
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def convert_xml_into_json(xml)
|
13
|
+
Hash.from_xml(xml)
|
14
|
+
end
|
15
|
+
|
16
|
+
def convert_json_from_xml(xml)
|
17
|
+
XmlSimple.xml_in(xml)
|
18
|
+
end
|
19
|
+
|
20
|
+
def handler(response)
|
21
|
+
rexml = REXML::Document.new(response.body)
|
22
|
+
self.define_singleton_method(:all) { convert_xml_into_json(response.body) }
|
23
|
+
|
24
|
+
# 通信がまともにできなかった場合はここがNGになる
|
25
|
+
# status = rexml.elements["result/status/systemStatus"].text
|
26
|
+
|
27
|
+
status_parser(rexml)
|
28
|
+
case response.env.method
|
29
|
+
when :get
|
30
|
+
get_response_parser(rexml)
|
31
|
+
# when :post
|
32
|
+
# post_response_parser(rexml)
|
33
|
+
end
|
34
|
+
|
35
|
+
self
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def encoded_key
|
41
|
+
if @serviceSecret.blank? && @licenseKey.blank?
|
42
|
+
error_msg = "serviceSecret and licenseKey are required"
|
43
|
+
raise StandardError, error_msg
|
44
|
+
else
|
45
|
+
"ESA " + Base64.strict_encode64(@serviceSecret + ":" + @licenseKey)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def get_endpoint(rexml)
|
50
|
+
result = {}
|
51
|
+
interfaceId = rexml.elements["result/status/interfaceId"].text
|
52
|
+
result[:api] = interfaceId.split('.')[0]
|
53
|
+
result[:method] = interfaceId.split('.')[1]
|
54
|
+
result[:camel] = "#{result[:api]}#{result[:method].capitalize}"
|
55
|
+
result
|
56
|
+
end
|
57
|
+
|
58
|
+
def status_parser(rexml)
|
59
|
+
endpoint = get_endpoint(rexml)
|
60
|
+
xpoint = "result/#{endpoint[:camel]}Result/code"
|
61
|
+
response_code = rexml.elements[xpoint].text
|
62
|
+
|
63
|
+
yml = "#{File.dirname(__FILE__)}/../../config/response_codes.yml"
|
64
|
+
response_codes = YAML.load_file(yml)
|
65
|
+
|
66
|
+
self.define_singleton_method(:is_success?) { response_code == 'N000' ? true : false }
|
67
|
+
self.define_singleton_method(:message) { response_codes[response_code] }
|
68
|
+
|
69
|
+
err_point = "result/#{endpoint[:camel]}Result/errorMessages/errorMessage/msg"
|
70
|
+
err_msg = []
|
71
|
+
rexml.elements.each(err_point) do |element|
|
72
|
+
err_msg << element.text
|
73
|
+
end
|
74
|
+
self.define_singleton_method(:errors) { err_msg }
|
75
|
+
|
76
|
+
self.is_success?
|
77
|
+
end
|
78
|
+
|
79
|
+
def get_response_parser(rexml)
|
80
|
+
endpoint = get_endpoint(rexml)
|
81
|
+
xpoint = "result/#{endpoint[:camel]}Result/item"
|
82
|
+
rexml.elements.each(xpoint) do |result|
|
83
|
+
result.children.each do |el|
|
84
|
+
next if el.to_s.strip.blank?
|
85
|
+
if el.has_elements?
|
86
|
+
begin
|
87
|
+
self.define_singleton_method(el.name.underscore) {
|
88
|
+
Hash.from_xml(el.to_s)
|
89
|
+
}
|
90
|
+
rescue => e
|
91
|
+
puts e
|
92
|
+
end
|
93
|
+
else
|
94
|
+
begin
|
95
|
+
self.define_singleton_method(el.name.underscore) {
|
96
|
+
el.text.try!(:force_encoding, 'utf-8')
|
97
|
+
}
|
98
|
+
rescue => e
|
99
|
+
puts e
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
self
|
105
|
+
end
|
106
|
+
|
107
|
+
def post_response_parser(rexml)
|
108
|
+
self
|
109
|
+
end
|
110
|
+
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
class Hash
|
115
|
+
class << self
|
116
|
+
|
117
|
+
def from_xml(rexml)
|
118
|
+
xml_elem_to_hash rexml.root
|
119
|
+
end
|
120
|
+
|
121
|
+
private
|
122
|
+
|
123
|
+
def xml_elem_to_hash(el)
|
124
|
+
value = if el.has_elements?
|
125
|
+
children = {}
|
126
|
+
el.each_element do |e|
|
127
|
+
children.merge!(xml_elem_to_hash(e)) do |k,v1,v2|
|
128
|
+
v1.is_a?(Array) ? v1 << v2 : [v1,v2]
|
129
|
+
end
|
130
|
+
end
|
131
|
+
children
|
132
|
+
else
|
133
|
+
el.text
|
134
|
+
end
|
135
|
+
{ el.name.to_sym => value }
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module RmsItemApi
|
2
|
+
module Item
|
3
|
+
include RmsItemApi::Helper
|
4
|
+
|
5
|
+
def delete(item_data)
|
6
|
+
request_xml = {itemDeleteRequest: {item: item_data}}.to_xml(
|
7
|
+
root: 'request', camelize: :lower, skip_types: true
|
8
|
+
)
|
9
|
+
response = connection('delete').post {|r| r.body = request_xml}
|
10
|
+
handler response
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module RmsItemApi
|
2
|
+
module Item
|
3
|
+
include RmsItemApi::Helper
|
4
|
+
|
5
|
+
def insert(item_data)
|
6
|
+
request_xml = {itemInsertRequest: {item: item_data}}.to_xml(
|
7
|
+
root: 'request', camelize: :lower, skip_types: true
|
8
|
+
)
|
9
|
+
response = connection('insert').post {|r| r.body = request_xml}
|
10
|
+
handler response
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module RmsItemApi
|
2
|
+
module Item
|
3
|
+
include RmsItemApi::Helper
|
4
|
+
|
5
|
+
def update(item_data)
|
6
|
+
request_xml = {itemUpdateRequest: {item: item_data}}.to_xml(
|
7
|
+
root: 'request', camelize: :lower, skip_types: true
|
8
|
+
)
|
9
|
+
response = connection('update').post {|r| r.body = request_xml}
|
10
|
+
handler response
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
data/lib/rms_item_api/version.rb
CHANGED
data/lib/rms_item_api.rb
CHANGED
@@ -1,135 +1,29 @@
|
|
1
1
|
require "rms_item_api/version"
|
2
|
+
require 'rms_item_api/helper.rb'
|
3
|
+
require 'rms_item_api/item.rb'
|
2
4
|
|
5
|
+
require 'rexml/document'
|
3
6
|
require 'yaml'
|
4
7
|
require 'faraday'
|
5
8
|
require 'active_support'
|
6
9
|
require 'active_support/core_ext'
|
7
10
|
require 'active_model'
|
8
|
-
require 'oga'
|
9
|
-
require 'hashie'
|
10
11
|
|
11
12
|
module RmsItemApi
|
12
|
-
class
|
13
|
-
|
13
|
+
class Client
|
14
|
+
include RmsItemApi::Helper
|
15
|
+
include RmsItemApi::Item
|
14
16
|
|
15
17
|
def initialize(serviceSecret:, licenseKey:)
|
16
18
|
@serviceSecret = serviceSecret
|
17
19
|
@licenseKey = licenseKey
|
18
|
-
@quiet_option = nil
|
19
20
|
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
self
|
24
|
-
end
|
25
|
-
|
26
|
-
def get(item_data)
|
27
|
-
result = connection('get').get {|r| r.params['itemUrl'] = item_data}
|
28
|
-
check_system_status(result.body, "Get")
|
29
|
-
end
|
30
|
-
|
31
|
-
def update(item_data)
|
32
|
-
request_xml = {itemUpdateRequest: {item: item_data}}.to_xml(
|
33
|
-
root: 'request', camelize: :lower, skip_types: true)
|
34
|
-
result = connection('update').post {|r| r.body = request_xml}
|
35
|
-
check_system_status(result.body, "Update")
|
36
|
-
end
|
37
|
-
|
38
|
-
def insert(item_data)
|
39
|
-
request_xml = {itemInsertRequest: {item: item_data}}.to_xml(
|
40
|
-
root: 'request', camelize: :lower, skip_types: true)
|
41
|
-
result = connection('insert').post {|r| r.body = request_xml}
|
42
|
-
check_system_status(result.body, "Insert")
|
43
|
-
end
|
44
|
-
|
45
|
-
def delete(item_data)
|
46
|
-
request_xml = {itemDeleteRequest: {item: item_data}}.to_xml(
|
47
|
-
root: 'request', camelize: :lower, skip_types: true)
|
48
|
-
result = connection('delete').post {|r| r.body = request_xml}
|
49
|
-
check_system_status(result.body, "Delete")
|
50
|
-
end
|
22
|
+
end
|
23
|
+
end
|
51
24
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
conn.headers['Authorization'] = encoded_key
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
def encoded_key
|
62
|
-
if @serviceSecret.blank? && @licenseKey.blank?
|
63
|
-
error_msg = "serviceSecret and licenseKey are required"
|
64
|
-
raise StandardError, error_msg
|
65
|
-
else
|
66
|
-
"ESA " + Base64.strict_encode64(@serviceSecret + ":" + @licenseKey)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
def check_system_status(result, method)
|
71
|
-
parsed_xml = Oga.parse_xml(result)
|
72
|
-
system_status = Oga.parse_xml(result).xpath("result/status/systemStatus").text
|
73
|
-
if system_status == 'NG'
|
74
|
-
raise Oga.parse_xml(result).xpath("result/status/message").text
|
75
|
-
else
|
76
|
-
parse_response(parsed_xml, method)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
def parse_response(parsed_xml, method)
|
81
|
-
result_code = parsed_xml.xpath("result/item#{method}Result/code").text
|
82
|
-
case method
|
83
|
-
when 'Get'
|
84
|
-
if result_code == 'N000'
|
85
|
-
puts "#{method} succeeded" unless @quiet_option
|
86
|
-
xpoint = 'result/itemGetResult/item'
|
87
|
-
parsed_xml.xpath(xpoint).each do |xml|
|
88
|
-
xml.children.each_with_index do |x, index|
|
89
|
-
not_have_children = true
|
90
|
-
|
91
|
-
x.children.each do |y|
|
92
|
-
y.children.each do |z|
|
93
|
-
not_have_children = false
|
94
|
-
begin
|
95
|
-
self.define_singleton_method(z.name.underscore) {
|
96
|
-
z.text.force_encoding('utf-8')
|
97
|
-
}
|
98
|
-
rescue => e
|
99
|
-
puts e unless @quiet_option
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
if not_have_children
|
105
|
-
self.define_singleton_method(x.name.underscore) {
|
106
|
-
x.text.force_encoding('utf-8')
|
107
|
-
}
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|
111
|
-
end
|
112
|
-
return self
|
113
|
-
else
|
114
|
-
puts "指定された商品管理番号は存在しません" unless @quiet_option
|
115
|
-
end
|
116
|
-
when 'Update', 'Insert', 'Delete'
|
117
|
-
if result_code == 'N000'
|
118
|
-
puts "#{method} succeeded" unless @quiet_option
|
119
|
-
else
|
120
|
-
config_file = "#{File.dirname(__FILE__)}/../config/field_name.yml"
|
121
|
-
field_name = Hashie::Mash.new(YAML.load_file(config_file))
|
122
|
-
xpoint = "result/item#{method}Result/errormessages"
|
123
|
-
parsed_xml.xpath(xpoint).each do |xml|
|
124
|
-
xml.children.each do |x|
|
125
|
-
error_field = x.xpath('fieldId').text
|
126
|
-
error_description = x.xpath('msg').text.force_encoding('utf-8')
|
127
|
-
puts "#{field_name[error_field]}:#{error_description}" unless @quiet_option
|
128
|
-
end
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end # case
|
132
|
-
end # parse_response
|
133
|
-
|
134
|
-
end # class rms_item_api
|
135
|
-
end # module rms_item_api
|
25
|
+
module RmsItemApi
|
26
|
+
class RmsItemApi < Client
|
27
|
+
# RmsItemApi::RmsItemApi is deprecated.
|
28
|
+
end
|
29
|
+
end
|
data/rms_item_api.gemspec
CHANGED
@@ -18,15 +18,17 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "faraday"
|
22
|
-
spec.add_dependency "activesupport"
|
23
|
-
spec.add_dependency "activemodel"
|
21
|
+
spec.add_dependency "faraday", '~> 0.11.0'
|
22
|
+
spec.add_dependency "activesupport", '~> 5.0.2'
|
23
|
+
spec.add_dependency "activemodel", '~> 5.0.2'
|
24
24
|
spec.add_dependency "builder"
|
25
|
-
spec.add_dependency "oga"
|
26
|
-
spec.add_dependency "hashie"
|
27
25
|
|
28
26
|
spec.add_development_dependency "bundler", "~> 1.10"
|
29
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
|
-
spec.add_development_dependency "
|
28
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
29
|
+
spec.add_development_dependency "minitest-reporters"
|
30
|
+
spec.add_development_dependency "webmock"
|
31
|
+
spec.add_development_dependency "vcr"
|
32
|
+
spec.add_development_dependency "dotenv"
|
31
33
|
spec.add_development_dependency "pry"
|
32
34
|
end
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rms_item_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- t4traw
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.11.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.11.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 5.0.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 5.0.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activemodel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 5.0.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 5.0.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: builder
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,27 +67,55 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
76
|
-
type: :
|
75
|
+
version: '1.10'
|
76
|
+
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '1.10'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: minitest
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '5.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '5.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: minitest-reporters
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - ">="
|
88
116
|
- !ruby/object:Gem::Version
|
89
117
|
version: '0'
|
90
|
-
type: :
|
118
|
+
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
@@ -95,35 +123,35 @@ dependencies:
|
|
95
123
|
- !ruby/object:Gem::Version
|
96
124
|
version: '0'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
126
|
+
name: webmock
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
|
-
- - "
|
129
|
+
- - ">="
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
131
|
+
version: '0'
|
104
132
|
type: :development
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
|
-
- - "
|
136
|
+
- - ">="
|
109
137
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
138
|
+
version: '0'
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
140
|
+
name: vcr
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
114
142
|
requirements:
|
115
|
-
- - "
|
143
|
+
- - ">="
|
116
144
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
145
|
+
version: '0'
|
118
146
|
type: :development
|
119
147
|
prerelease: false
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
121
149
|
requirements:
|
122
|
-
- - "
|
150
|
+
- - ">="
|
123
151
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
152
|
+
version: '0'
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
154
|
+
name: dotenv
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|
128
156
|
requirements:
|
129
157
|
- - ">="
|
@@ -159,17 +187,19 @@ extra_rdoc_files: []
|
|
159
187
|
files:
|
160
188
|
- ".gitignore"
|
161
189
|
- ".rbenv-gemsets"
|
162
|
-
- ".rspec"
|
163
190
|
- ".travis.yml"
|
164
191
|
- Gemfile
|
165
|
-
- Gemfile.lock
|
166
192
|
- LICENSE
|
167
193
|
- README.md
|
168
194
|
- Rakefile
|
169
|
-
-
|
170
|
-
- bin/setup
|
171
|
-
- config/field_name.yml
|
195
|
+
- config/response_codes.yml
|
172
196
|
- lib/rms_item_api.rb
|
197
|
+
- lib/rms_item_api/helper.rb
|
198
|
+
- lib/rms_item_api/item.rb
|
199
|
+
- lib/rms_item_api/item/delete.rb
|
200
|
+
- lib/rms_item_api/item/get.rb
|
201
|
+
- lib/rms_item_api/item/insert.rb
|
202
|
+
- lib/rms_item_api/item/update.rb
|
173
203
|
- lib/rms_item_api/version.rb
|
174
204
|
- rms_item_api.gemspec
|
175
205
|
homepage: https://github.com/t4traw/rms_item_api
|
data/.rspec
DELETED
data/Gemfile.lock
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rms_item_api (0.1.2)
|
5
|
-
activemodel
|
6
|
-
activesupport
|
7
|
-
builder
|
8
|
-
faraday
|
9
|
-
hashie
|
10
|
-
oga
|
11
|
-
|
12
|
-
GEM
|
13
|
-
remote: https://rubygems.org/
|
14
|
-
specs:
|
15
|
-
activemodel (5.0.2)
|
16
|
-
activesupport (= 5.0.2)
|
17
|
-
activesupport (5.0.2)
|
18
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
|
-
i18n (~> 0.7)
|
20
|
-
minitest (~> 5.1)
|
21
|
-
tzinfo (~> 1.1)
|
22
|
-
ansi (1.5.0)
|
23
|
-
ast (2.3.0)
|
24
|
-
builder (3.2.3)
|
25
|
-
coderay (1.1.1)
|
26
|
-
concurrent-ruby (1.0.5)
|
27
|
-
diff-lcs (1.3)
|
28
|
-
faraday (0.11.0)
|
29
|
-
multipart-post (>= 1.2, < 3)
|
30
|
-
hashie (3.5.5)
|
31
|
-
i18n (0.8.1)
|
32
|
-
method_source (0.8.2)
|
33
|
-
minitest (5.10.1)
|
34
|
-
multipart-post (2.0.0)
|
35
|
-
oga (2.9)
|
36
|
-
ast
|
37
|
-
ruby-ll (~> 2.1)
|
38
|
-
pry (0.10.4)
|
39
|
-
coderay (~> 1.1.0)
|
40
|
-
method_source (~> 0.8.1)
|
41
|
-
slop (~> 3.4)
|
42
|
-
rake (10.5.0)
|
43
|
-
rspec (3.5.0)
|
44
|
-
rspec-core (~> 3.5.0)
|
45
|
-
rspec-expectations (~> 3.5.0)
|
46
|
-
rspec-mocks (~> 3.5.0)
|
47
|
-
rspec-core (3.5.4)
|
48
|
-
rspec-support (~> 3.5.0)
|
49
|
-
rspec-expectations (3.5.0)
|
50
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
-
rspec-support (~> 3.5.0)
|
52
|
-
rspec-mocks (3.5.0)
|
53
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
-
rspec-support (~> 3.5.0)
|
55
|
-
rspec-support (3.5.0)
|
56
|
-
ruby-ll (2.1.2)
|
57
|
-
ansi
|
58
|
-
ast
|
59
|
-
slop (3.6.0)
|
60
|
-
thread_safe (0.3.6)
|
61
|
-
tzinfo (1.2.2)
|
62
|
-
thread_safe (~> 0.1)
|
63
|
-
|
64
|
-
PLATFORMS
|
65
|
-
ruby
|
66
|
-
|
67
|
-
DEPENDENCIES
|
68
|
-
bundler (~> 1.10)
|
69
|
-
pry
|
70
|
-
rake (~> 10.0)
|
71
|
-
rms_item_api!
|
72
|
-
rspec
|
73
|
-
|
74
|
-
BUNDLED WITH
|
75
|
-
1.14.5
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "rms_item_api"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
data/config/field_name.yml
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
501: '商品管理番号'
|
2
|
-
502: '商品名'
|
3
|
-
503: '販売価格'
|
4
|
-
504: '全商品ディレクトリID'
|
5
|
-
505: '商品情報レイアウト'
|
6
|
-
506: '消費税'
|
7
|
-
507: '送料'
|
8
|
-
508: '代引き手数料'
|
9
|
-
509: '在庫タイプ'
|
10
|
-
510: '注文受付数'
|
11
|
-
511: '倉庫指定'
|
12
|
-
512: '注文ボタン'
|
13
|
-
513: '資料請求ボタン'
|
14
|
-
514: '商品問い合わせボタン'
|
15
|
-
515: 'モバイル表示'
|
16
|
-
516: 'のし対応'
|
17
|
-
517: 'ポイント変倍率'
|
18
|
-
518: 'ポイント変倍適応期間(開始)'
|
19
|
-
518: 'ポイント変倍適応期間(終了)'
|
20
|
-
519: '商品画像名(ALT)'
|
21
|
-
520: '商品番号'
|
22
|
-
521: 'PC用商品説明文'
|
23
|
-
522: 'モバイル用商品説明文'
|
24
|
-
523: '表示価格'
|
25
|
-
524: '商品画像URL'
|
26
|
-
525: '動画URL'
|
27
|
-
526: 'PC用キャッチコピー'
|
28
|
-
527: 'モバイル用キャッチコピー'
|
29
|
-
528: 'PC用販売説明文'
|
30
|
-
529: '個別送料'
|
31
|
-
530: '送料区分1'
|
32
|
-
531: '送料区分2'
|
33
|
-
532: '期間限定販売フラグ'
|
34
|
-
532: '期間限定販売開始日'
|
35
|
-
532: '期間限定販売終了日'
|
36
|
-
534: '在庫数表示'
|
37
|
-
535: '項目選択肢別在庫用縦軸選択肢項目名'
|
38
|
-
536: '項目選択肢別在庫用横軸選択肢項目名'
|
39
|
-
537: '項目選択肢別在庫用残り表示閾値'
|
40
|
-
540: 'カタログID'
|
41
|
-
542: '在庫切れ時の注文受付'
|
42
|
-
543: '在庫あり時納期管理番号'
|
43
|
-
544: '在庫切れ時納期管理番号'
|
44
|
-
552: 'タグID'
|
45
|
-
553: 'レビュー表示'
|
46
|
-
554: 'あす楽配送管理番号'
|
47
|
-
556: 'サイズ表リンクコード'
|
48
|
-
564: '再入荷のお知らせボタン'
|
49
|
-
565: 'サーチ非表示'
|
50
|
-
566: '医薬品説明文'
|
51
|
-
567: '医薬品注意事項'
|
52
|
-
568: '二重価格文言ID'
|
53
|
-
570: 'スマートフォン用商品説明文'
|
54
|
-
702: '選択肢スタイル'
|
55
|
-
703: 'Select/Checkbox用項目名'
|
56
|
-
704: 'Select/Checkbox用選択肢'
|
57
|
-
705: '項目選択肢別在庫用横軸選択肢'
|
58
|
-
706: '項目選択肢別在庫用横軸選択肢子番号'
|
59
|
-
707: '項目選択肢別在庫用縦軸選択肢'
|
60
|
-
708: '項目選択肢別在庫用縦軸選択肢子番号'
|
61
|
-
709: '項目選択肢別在庫用取り寄せ可能表示'
|
62
|
-
710: '在庫数'
|
63
|
-
711: '在庫戻し設定'
|