xdelivery 0.2.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/xdelivery.rb +2 -2
- data/lib/xdelivery/api/orders.rb +2 -2
- data/lib/xdelivery/api/response/shops.rb +20 -0
- data/lib/xdelivery/api/sales.rb +2 -2
- data/lib/xdelivery/api/shops.rb +9 -0
- data/lib/xdelivery/client.rb +2 -2
- data/lib/xdelivery/version.rb +1 -1
- metadata +4 -4
- data/lib/xdelivery/api/invoice_settings.rb +0 -9
- data/lib/xdelivery/api/response/invoice_settings.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32e729a05b87441921a17b67e77554b16d1115b0
|
4
|
+
data.tar.gz: 9a1734fc97bb1424e72cbf0b637d2ca2996cb592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f66bfcdad33a55d88e597c722995ad7611a5efea9af5dadcc17c1fcbebecb374b2c203f4c7446aba88bf390efb6364296e6347d0e4f1f27a053fb7a6244bb0a3
|
7
|
+
data.tar.gz: 8819f364dfa29f97ca66f4e44cc7cc0e76f71848b97a77d25e54ff3e0cde36a17701c9fda6182fd59ac28ecb5f948da25dda4267fdd7a607b91ab70e0778e435
|
data/Gemfile.lock
CHANGED
data/lib/xdelivery.rb
CHANGED
@@ -8,12 +8,12 @@ require "xdelivery/api/orders"
|
|
8
8
|
require "xdelivery/api/sales"
|
9
9
|
require "xdelivery/api/products"
|
10
10
|
require "xdelivery/api/ping"
|
11
|
-
require "xdelivery/api/
|
11
|
+
require "xdelivery/api/shops"
|
12
12
|
require "xdelivery/api/response/base"
|
13
13
|
require "xdelivery/api/response/orders"
|
14
14
|
require "xdelivery/api/response/products"
|
15
15
|
require "xdelivery/api/response/ping"
|
16
|
-
require "xdelivery/api/response/
|
16
|
+
require "xdelivery/api/response/shops"
|
17
17
|
|
18
18
|
|
19
19
|
module Xdelivery
|
data/lib/xdelivery/api/orders.rb
CHANGED
@@ -8,11 +8,11 @@ module Xdelivery
|
|
8
8
|
COLUMNS = [
|
9
9
|
:order_id, :provider, :recipient, :mobile, :email, :store_id, :store_name, :address,
|
10
10
|
:items, :warehouse_items, :total_order_amount, :cash_on_delivery, :order_created_at,
|
11
|
-
:note, :callback_url, :ref_id, :tag, :merchant_note
|
11
|
+
:note, :callback_url, :ref_id, :tag, :merchant_note, :shop_id
|
12
12
|
]
|
13
13
|
|
14
14
|
INVOICE_COLUMNS = [
|
15
|
-
:create_type, :email, :company_code, :company_title, :donate_code, :device_id, :device, :items
|
15
|
+
:create_type, :email, :company_code, :company_title, :donate_code, :device_id, :device, :items
|
16
16
|
]
|
17
17
|
|
18
18
|
def add(params, invoice_params={})
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Xdelivery
|
2
|
+
module API
|
3
|
+
module Response
|
4
|
+
class Shops < Base
|
5
|
+
|
6
|
+
Shop = Struct.new(:id, :title, :pay2go_merchant_id, :default_shop)
|
7
|
+
|
8
|
+
def status?
|
9
|
+
auth?
|
10
|
+
end
|
11
|
+
|
12
|
+
def shops
|
13
|
+
data.map do |setting|
|
14
|
+
Shop.new(setting['id'], setting['title'], setting['pay2go_merchant_id'], setting['default_shop'])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/xdelivery/api/sales.rb
CHANGED
@@ -8,11 +8,11 @@ module Xdelivery
|
|
8
8
|
COLUMNS = [
|
9
9
|
:order_id, :recipient, :mobile, :email, :address,
|
10
10
|
:items, :warehouse_items, :total_order_amount, :cash_on_delivery, :order_created_at,
|
11
|
-
:note, :callback_url, :ref_id, :tag, :tracking_code, :merchant_note
|
11
|
+
:note, :callback_url, :ref_id, :tag, :tracking_code, :merchant_note, :shop_id
|
12
12
|
]
|
13
13
|
|
14
14
|
INVOICE_COLUMNS = [
|
15
|
-
:create_type, :email, :company_code, :company_title, :donate_code, :device_id, :device, :items
|
15
|
+
:create_type, :email, :company_code, :company_title, :donate_code, :device_id, :device, :items
|
16
16
|
]
|
17
17
|
|
18
18
|
def add(params, invoice_params={})
|
data/lib/xdelivery/client.rb
CHANGED
data/lib/xdelivery/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xdelivery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- eddie
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,16 +98,16 @@ files:
|
|
98
98
|
- bin/setup
|
99
99
|
- lib/xdelivery.rb
|
100
100
|
- lib/xdelivery/api/base.rb
|
101
|
-
- lib/xdelivery/api/invoice_settings.rb
|
102
101
|
- lib/xdelivery/api/orders.rb
|
103
102
|
- lib/xdelivery/api/ping.rb
|
104
103
|
- lib/xdelivery/api/products.rb
|
105
104
|
- lib/xdelivery/api/response/base.rb
|
106
|
-
- lib/xdelivery/api/response/invoice_settings.rb
|
107
105
|
- lib/xdelivery/api/response/orders.rb
|
108
106
|
- lib/xdelivery/api/response/ping.rb
|
109
107
|
- lib/xdelivery/api/response/products.rb
|
108
|
+
- lib/xdelivery/api/response/shops.rb
|
110
109
|
- lib/xdelivery/api/sales.rb
|
110
|
+
- lib/xdelivery/api/shops.rb
|
111
111
|
- lib/xdelivery/callback.rb
|
112
112
|
- lib/xdelivery/client.rb
|
113
113
|
- lib/xdelivery/version.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Xdelivery
|
2
|
-
module API
|
3
|
-
module Response
|
4
|
-
class InvoiceSettings < Base
|
5
|
-
|
6
|
-
Setting = Struct.new(:id, :title, :pay2go_merchant_id, :default_setting)
|
7
|
-
|
8
|
-
def status?
|
9
|
-
auth?
|
10
|
-
end
|
11
|
-
|
12
|
-
def settings
|
13
|
-
data.map do |setting|
|
14
|
-
Setting.new(setting['id'], setting['title'], setting['pay2go_merchant_id'], setting['default_setting'])
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|