ne_api 0.0.9 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +15 -2
- data/config/api.yaml +14 -0
- data/lib/ne_api.rb +4 -4
- data/lib/ne_api/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e20d22c10dc5befa1b973bbcf333eaec231c9b8ffc415653600c19ec95d02871
|
4
|
+
data.tar.gz: 9af0c2fd55b8f86400f18aa99f9935e86e7c1542bca9ad2242709fee0bb9e96c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d28d90cc9589de5d16e36e0b267207d69c23772fa0abf5e923bf538417b34153bb21831a9371848c279ece307dd3f2db207be1131d76dec75239e82c73ebde6d
|
7
|
+
data.tar.gz: bb7445856fb512af31671a73cbf7a49b909d63f04c3c93d5841fa1be817dda093333eac52f48698295f0b9823b485a34ea2660556b8bb451a8ee73d88b97668b
|
data/README.md
CHANGED
@@ -24,6 +24,11 @@ Or install it yourself as:
|
|
24
24
|
|
25
25
|
please read [API Document](http://api.next-e.jp/).
|
26
26
|
|
27
|
+
## Global Environment
|
28
|
+
|
29
|
+
CLIENT_ID ....... Get it from Next-Engine's 「アプリを作る」->「API」->「クライアントID」 page
|
30
|
+
CLIENT_SECRET ... Get it from Next-Engine's 「アプリを作る」->「API」->「クライアントシークレット」 page
|
31
|
+
|
27
32
|
## Sample Application
|
28
33
|
|
29
34
|
```ruby
|
@@ -35,12 +40,12 @@ class MyApp < Sinatra::Base
|
|
35
40
|
CLIENT_SECRET = "XXXX"
|
36
41
|
CALLBACK_URI = "https://localhost:3000/callback"
|
37
42
|
get "/" do
|
38
|
-
"<a href=" + NeAPI::NE_SERVER_HOST + NeAPI::Auth::SIGN_IN_PATH + "?client_id="+CLIENT_ID+"&
|
43
|
+
"<a href=" + NeAPI::NE_SERVER_HOST + NeAPI::Auth::SIGN_IN_PATH + "?client_id="+CLIENT_ID+"&redirect_uri="+ CALLBACK_URI + ">Connect with Next Engine</a>"
|
39
44
|
end
|
40
45
|
|
41
46
|
get "/callback" do
|
42
47
|
auth = NeAPI::Auth.new redirect_url: CALLBACK_URI
|
43
|
-
res = auth.ne_auth params[:uid], params[:state]
|
48
|
+
res = auth.ne_auth params[:uid], params[:state], CLIENT_ID, CLIENT_SECRET
|
44
49
|
session[:access_token] = res["access_token"]
|
45
50
|
session[:refresh_token] = res["refresh_token"]
|
46
51
|
redirect "/home"
|
@@ -107,6 +112,14 @@ end
|
|
107
112
|
5. Create a new Pull Request
|
108
113
|
|
109
114
|
## Update
|
115
|
+
### ver0.0.14
|
116
|
+
* 受注伝票一括更新・納品書印刷済みの対応の修正
|
117
|
+
|
118
|
+
### ver0.0.12
|
119
|
+
* 受注伝票一括更新・納品書印刷済み一括更新に対応
|
120
|
+
|
121
|
+
### ver0.0.11
|
122
|
+
* NEのログイン認証方式に変更
|
110
123
|
|
111
124
|
### ver0.0.9
|
112
125
|
* リトライすべきエラーメッセージについてリトライするようにした
|
data/config/api.yaml
CHANGED
@@ -198,6 +198,11 @@
|
|
198
198
|
- search
|
199
199
|
:prefix: mall_category
|
200
200
|
:fields: id,mall_id,code,parent_mall_category_id,name,full_name
|
201
|
+
:system_deliverydate:
|
202
|
+
:method:
|
203
|
+
- info
|
204
|
+
:prefix: delivery_date
|
205
|
+
:fields: id,name,days,note
|
201
206
|
:receiveorder_uploadpattern:
|
202
207
|
:method:
|
203
208
|
- info
|
@@ -211,6 +216,8 @@
|
|
211
216
|
- shipped
|
212
217
|
- labelprinted
|
213
218
|
- divide
|
219
|
+
- bulkupdate
|
220
|
+
- bulkupdatereceipted
|
214
221
|
:prefix: receive_order
|
215
222
|
:fields: shop_id,id,shop_cut_form_id,date,import_date,important_check_id,important_check_name,confirm_check_id,confirm_check_name,confirm_ids,mail_status,gruoping_tag,import_type_id,import_type_name,cancel_type_id,cancel_type_name,cancel_date,closed_after_edit_date,order_status_id,order_status_name,delivery_id,delivery_name,payment_method_id,payment_method_name,total_amount,tax_amount,charge_amount,delivery_fee_amount,other_amount,point_amount,goods_amount,deposit_amount,deposit_type_id,deposit_type_name,deposit_date,foreign_total_amount,foreign_tax_amount,foreign_charge_amount,foreign_delivery_fee_amount,foreign_other_amount,foreign_goods_amount,foreign_deposit_amount,note,include_possible_order_id,include_to_order_id,multi_delivery_parent_order_id,multi_delivery_parent_flag,statement_delivery_instruct_printing_date,statement_delivery_printing_date,statement_delivery_text,send_date,send_plan_date,send_sequence,worker_text,picking_instruct,picking_min_supplier_id,picking_min_goods_id,label_print_date,label_print_flag,hope_delivery_date,hope_delivery_time_slot_id,hope_delivery_time_slot_name,delivery_method_id,delivery_method_name,seal1_id,seal1_name,seal2_id,seal2_name,seal3_id,seal3_name,seal4_id,seal4_name,business_office_stop_id,business_office_stop_name,invoice_id,invoice_name,temperature_id,temperature_name,business_office_name,gift_flag,delivery_cut_form_id,delivery_cut_form_note,credit_type_id,credit_type_name,credit_approval_no,credit_approval_amount,credit_approval_type_id,credit_approval_type_name,credit_approval_date,credit_approval_rate,credit_number_payments,credit_authorization_center_id,credit_authorization_center_name,credit_approval_fax_printing_date,customer_type_id,customer_type_name,customer_id,purchaser_name,purchaser_kana,purchaser_zip_code,purchaser_address1,purchaser_address2,purchaser_tel,purchaser_fax,purchaser_mail_address,consignee_name,consignee_kana,consignee_zip_code,consignee_address1,consignee_address2,consignee_tel,consignee_fax,reminder_start_date,reminder_last_date,reminder_count,important_check_pic_id,important_check_pic_name,pic_id,pic_name,send_pic_id,send_pic_name,deleted_flag,creation_date,last_modified_date,last_modified_null_safe_date,creator_id,creator_name,last_modified_by_id,last_modified_by_null_safe_id,last_modified_by_name,last_modified_by_null_safe_name
|
216
223
|
:receiveorder_option:
|
@@ -244,3 +251,10 @@
|
|
244
251
|
- search
|
245
252
|
:prefix: payment_delivery_convert
|
246
253
|
:fields: text,type,multi_id,delivery_id,deleted_flag,creation_date,last_modified_date,creator_id,creator_name,last_modified_by_id,last_modified_by_name
|
254
|
+
:notice_execution:
|
255
|
+
:method:
|
256
|
+
- add
|
257
|
+
- count
|
258
|
+
- search
|
259
|
+
:prefix: execution_notice
|
260
|
+
:fields: id,success,title,content,read,creation_date,last_modified_date
|
data/lib/ne_api.rb
CHANGED
@@ -115,7 +115,7 @@ module NeAPI
|
|
115
115
|
get_key = "data"
|
116
116
|
when "info"
|
117
117
|
query = nil
|
118
|
-
when "update", "upload", "receipted", "shipped", "labelprinted"
|
118
|
+
when "update", "upload", "receipted", "shipped", "labelprinted", "add", "bulkupdate", "bulkupdatereceipted"
|
119
119
|
get_key = "result"
|
120
120
|
when "divide"
|
121
121
|
get_key = "receive_order_id"
|
@@ -146,12 +146,12 @@ module NeAPI
|
|
146
146
|
|
147
147
|
#uid/state取得
|
148
148
|
def sign_in client_id = ENV["CLIENT_ID"] , client_secret = ENV["CLIENT_SECRET"]
|
149
|
-
Launchy.open NE_SERVER_HOST + SIGN_IN_PATH + "?client_id="+client_id+"&
|
149
|
+
Launchy.open NE_SERVER_HOST + SIGN_IN_PATH + "?client_id="+client_id+"&redirect_uri="+@redirect_url
|
150
150
|
end
|
151
151
|
|
152
152
|
#access_token/企業情報取得
|
153
|
-
def ne_auth uid, state
|
154
|
-
@ne_user = response ( conn.post NEAUTH_PATH, {uid: uid, state: state})
|
153
|
+
def ne_auth uid, state, client_id = ENV["CLIENT_ID"], client_secret = ENV["CLIENT_SECRET"]
|
154
|
+
@ne_user = response ( conn.post NEAUTH_PATH, {uid: uid, state: state, client_id: client_id, client_secret: client_secret})
|
155
155
|
raise NeAPIException, "003001:Next Engineが大変混み合っているようです" if @ne_user == false
|
156
156
|
@ne_user
|
157
157
|
end
|
data/lib/ne_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ne_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuuna Kurita
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -174,8 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
- !ruby/object:Gem::Version
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
|
-
|
178
|
-
rubygems_version: 2.2.2
|
177
|
+
rubygems_version: 3.0.3
|
179
178
|
signing_key:
|
180
179
|
specification_version: 4
|
181
180
|
summary: Next Engine API for ruby
|