mints 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/client.rb +50 -26
- data/lib/contact.rb +12 -12
- data/lib/pub.rb +72 -15
- data/lib/user.rb +193 -73
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8cfd66c96475748e1eaa88e97ee51b2c3fc7b2a682fc558f4bb7eda98d31ea
|
4
|
+
data.tar.gz: 5175fb3ceaa8f4c9c607b76d90ff2cec26eec6a11e487f91e7d99645dd36687f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4e6b98fa27ba280d9f912b91c4c8f0da3ebd8f1750c2ee8d06429d1983c56dbad0cb34c8f9d3b6595155ebced1af354c8c36a39104e412cb04d2ea9628d5684
|
7
|
+
data.tar.gz: 9f1952c50204dde682a49fc1c9039f3e3f2da84078f711f227f236b8b9969c795cbebf9bba9a0350ba205dee403762789413e9381c3912c107a602494e781d16
|
data/lib/client.rb
CHANGED
@@ -16,18 +16,25 @@ module Mints
|
|
16
16
|
self.set_scope(scope)
|
17
17
|
end
|
18
18
|
|
19
|
-
def raw(action, url, data = nil, base_url = nil)
|
19
|
+
def raw(action, url, options = nil, data = nil, base_url = nil)
|
20
20
|
base_url = @base_url if !base_url
|
21
|
-
|
22
|
-
|
21
|
+
|
22
|
+
if (options && options.class == Hash)
|
23
|
+
uri = Addressable::URI.new
|
24
|
+
uri.query_values = options
|
25
|
+
else
|
26
|
+
uri = ""
|
27
|
+
end
|
28
|
+
|
29
|
+
full_url = "#{@host}#{base_url}#{url}#{uri}"
|
23
30
|
if action === 'get'
|
24
|
-
response = self.send("#{@scope}_#{action}", full_url)
|
31
|
+
response = self.send("#{@scope}_#{action}", "#{full_url}")
|
25
32
|
elsif action === 'create' or action === 'post'
|
26
33
|
action = 'post'
|
27
|
-
response = self.send("#{@scope}_#{action}", full_url, data)
|
34
|
+
response = self.send("#{@scope}_#{action}", "#{full_url}", data)
|
28
35
|
elsif action === 'put' or action === 'patch' or action ==='update'
|
29
36
|
action = 'put'
|
30
|
-
response = self.send("#{@scope}_#{action}", full_url, data)
|
37
|
+
response = self.send("#{@scope}_#{action}", "#{full_url}", data)
|
31
38
|
end
|
32
39
|
if (response.response.code == "404")
|
33
40
|
raise 'NotFoundError'
|
@@ -63,37 +70,54 @@ module Mints
|
|
63
70
|
route_array.push n
|
64
71
|
end
|
65
72
|
route = route_array.join("/")
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
url =
|
78
|
-
end
|
79
|
-
if action === 'get'
|
73
|
+
|
74
|
+
|
75
|
+
slug = nil
|
76
|
+
uri = Addressable::URI.new
|
77
|
+
if action == "get"
|
78
|
+
if args.first.class == Hash
|
79
|
+
uri.query_values = args.first
|
80
|
+
elsif args.first.class == String or Integer
|
81
|
+
slug = args.first
|
82
|
+
uri.query_values = args[1]
|
83
|
+
end
|
84
|
+
url = self.get_url(route, object, uri, slug)
|
80
85
|
response = self.send("#{@scope}_#{action}", url)
|
81
|
-
elsif action
|
86
|
+
elsif action == "post" or action == "create"
|
87
|
+
if args[1].class == Hash
|
88
|
+
uri.query_values = args[1]
|
89
|
+
end
|
90
|
+
url = self.get_url(route, object, uri, slug)
|
82
91
|
action = 'post'
|
83
92
|
data = args[0]
|
84
93
|
response = self.send("#{@scope}_#{action}", url, {data: data})
|
85
|
-
elsif action
|
94
|
+
elsif action == "put" or action == "update"
|
95
|
+
if args.first.class == String or Integer
|
96
|
+
slug = args.first
|
97
|
+
uri.query_values = args[2]
|
98
|
+
end
|
99
|
+
url = self.get_url(route, object, uri, slug)
|
86
100
|
action = 'put'
|
87
101
|
id = args[0]
|
88
102
|
data = args[1]
|
89
|
-
response = self.send("#{@scope}_#{action}", "#{url}", data)
|
103
|
+
response = self.send("#{@scope}_#{action}", "#{url}", {data: data})
|
90
104
|
end
|
91
|
-
|
92
|
-
if
|
93
|
-
|
105
|
+
|
106
|
+
if response.response.code == "404"
|
107
|
+
raise 'NotFoundError'
|
108
|
+
elsif response.response.code == "500"
|
109
|
+
raise 'InternalServerError'
|
94
110
|
end
|
95
111
|
return JSON.parse(response.body)
|
96
112
|
end
|
113
|
+
|
114
|
+
def get_url(route, object, uri, slug = nil)
|
115
|
+
if (slug)
|
116
|
+
return "#{@host}#{@base_url}/#{route}/#{object}/#{slug}#{uri}"
|
117
|
+
else
|
118
|
+
return "#{@host}#{@base_url}/#{route}/#{object}#{uri}"
|
119
|
+
end
|
120
|
+
end
|
97
121
|
|
98
122
|
def replacements
|
99
123
|
return [
|
data/lib/contact.rb
CHANGED
@@ -13,7 +13,7 @@ module Mints
|
|
13
13
|
email: email,
|
14
14
|
password: password
|
15
15
|
}
|
16
|
-
return @client.raw("post", "/contacts/register", {data: data})
|
16
|
+
return @client.raw("post", "/contacts/register", nil, {data: data})
|
17
17
|
end
|
18
18
|
|
19
19
|
def login(email, password)
|
@@ -21,7 +21,7 @@ module Mints
|
|
21
21
|
email: email,
|
22
22
|
password: password
|
23
23
|
}
|
24
|
-
response = @client.raw("post", "/contacts/login", {data: data})
|
24
|
+
response = @client.raw("post", "/contacts/login", nil, {data: data})
|
25
25
|
if response.key? "session_token"
|
26
26
|
@client.session_token = response["session_token"]
|
27
27
|
end
|
@@ -29,27 +29,27 @@ module Mints
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def logout
|
32
|
-
response = @client.raw("post", "/contacts/logout"
|
32
|
+
response = @client.raw("post", "/contacts/logout") if session_token?
|
33
33
|
if response["success"]
|
34
34
|
@client.session_token = nil
|
35
35
|
end
|
36
36
|
return response
|
37
37
|
end
|
38
38
|
|
39
|
-
def change_password
|
40
|
-
return @client.raw("post", "/contacts/change-password", data)
|
39
|
+
def change_password(data)
|
40
|
+
return @client.raw("post", "/contacts/change-password", nil, data)
|
41
41
|
end
|
42
42
|
|
43
|
-
def recover_password
|
44
|
-
return @client.raw("post", "/contacts/recover-password", data)
|
43
|
+
def recover_password(data)
|
44
|
+
return @client.raw("post", "/contacts/recover-password", nil, data)
|
45
45
|
end
|
46
46
|
|
47
|
-
def reset_password
|
48
|
-
return @client.raw("post", "/contacts/reset-password", data)
|
47
|
+
def reset_password(data)
|
48
|
+
return @client.raw("post", "/contacts/reset-password", nil, data)
|
49
49
|
end
|
50
50
|
|
51
|
-
def auth_login
|
52
|
-
return @client.raw("post", "/contacts/oauth-login", data)
|
51
|
+
def auth_login(data)
|
52
|
+
return @client.raw("post", "/contacts/oauth-login", nil, data)
|
53
53
|
end
|
54
54
|
|
55
55
|
def me
|
@@ -61,7 +61,7 @@ module Mints
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def update
|
64
|
-
return @client.raw("put", "/contacts/update", data)
|
64
|
+
return @client.raw("put", "/contacts/update", nil, data)
|
65
65
|
end
|
66
66
|
|
67
67
|
private
|
data/lib/pub.rb
CHANGED
@@ -12,39 +12,96 @@ module Mints
|
|
12
12
|
user_agent: user_agent,
|
13
13
|
url: url
|
14
14
|
}
|
15
|
-
return @client.raw("post", "/register-visit-timer", data)
|
15
|
+
return @client.raw("post", "/register-visit-timer", nil, data)
|
16
16
|
end
|
17
17
|
|
18
18
|
def register_visit_timer
|
19
19
|
return @client.raw("get", "/register-visit-timer")
|
20
20
|
end
|
21
21
|
|
22
|
-
def get_content_page
|
23
|
-
return @client.raw("get", "/content-pages/#{slug}")
|
22
|
+
def get_content_page(slug, options = nil)
|
23
|
+
return @client.raw("get", "/content-pages/#{slug}", options)
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
27
|
-
return @client.raw("get", "/content/content-templates
|
26
|
+
def get_content_templates(options = nil)
|
27
|
+
return @client.raw("get", "/content/content-templates")
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
31
|
-
return @client.raw("get", "/content/content-
|
30
|
+
def get_content_template(slug, options = nil)
|
31
|
+
return @client.raw("get", "/content/content-templates/#{slug}", options)
|
32
32
|
end
|
33
33
|
|
34
|
-
def
|
35
|
-
return @client.raw("get", "/content/
|
34
|
+
def content_instances(options)
|
35
|
+
return @client.raw("get", "/content/content-instances", options)
|
36
36
|
end
|
37
37
|
|
38
|
-
def
|
39
|
-
return @client.raw("get", "/content/
|
38
|
+
def content_instance(slug, options = nil)
|
39
|
+
return @client.raw("get", "/content/content-instances/#{slug}", options)
|
40
40
|
end
|
41
41
|
|
42
|
-
def
|
43
|
-
return @client.raw("get", "/content/
|
42
|
+
def get_stories(options = nil)
|
43
|
+
return @client.raw("get", "/content/stories", options)
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
47
|
-
|
46
|
+
def get_story(slug, options = nil)
|
47
|
+
|
48
|
+
return @client.raw("get", "/content/stories/#{slug}", options)
|
49
|
+
end
|
50
|
+
|
51
|
+
def get_forms(options = nil)
|
52
|
+
return @client.raw("get", "/content/forms/{slug}", options)
|
53
|
+
end
|
54
|
+
|
55
|
+
def get_form(slug, options = nil)
|
56
|
+
return @client.raw("get", "/content/forms/{slug}", options)
|
57
|
+
end
|
58
|
+
|
59
|
+
def submit_form(data)
|
60
|
+
return @client.raw("post", "/forms/store", nil, data)
|
61
|
+
end
|
62
|
+
|
63
|
+
def get_products(options = nil)
|
64
|
+
return @client.raw("get", "/ecommerce/products", options)
|
65
|
+
end
|
66
|
+
|
67
|
+
def get_product(slug, options = nil)
|
68
|
+
return @client.raw("get", "/ecommerce/products/#{slug}", options)
|
69
|
+
end
|
70
|
+
|
71
|
+
def get_product_brands(options = nil)
|
72
|
+
return @client.raw("get", "/ecommerce/product-brands", options)
|
73
|
+
end
|
74
|
+
|
75
|
+
def get_product_brand(slug, options = nil)
|
76
|
+
return @client.raw("get", "/ecommerce/product-brands/#{slug}", options)
|
77
|
+
end
|
78
|
+
|
79
|
+
def get_skus(options = nil)
|
80
|
+
return @client.raw("get", "/ecommerce/skus", options)
|
81
|
+
end
|
82
|
+
|
83
|
+
def get_sku(slug, options = nil)
|
84
|
+
return @client.raw("get", "/ecommerce/skus/#{slug}", options)
|
85
|
+
end
|
86
|
+
|
87
|
+
def get_categories(options = nil)
|
88
|
+
return @client.raw("get", "/config/categories", options)
|
89
|
+
end
|
90
|
+
|
91
|
+
def get_category(slug, options = nil)
|
92
|
+
return @client.raw("get", "/config/categories/#{slug}", options)
|
93
|
+
end
|
94
|
+
|
95
|
+
def get_tags(options)
|
96
|
+
return @client.raw("get", "/config/tags", options)
|
97
|
+
end
|
98
|
+
|
99
|
+
def get_tag(slug, options = nil)
|
100
|
+
return @client.raw("get", "/config/tags/#{slug}", options)
|
101
|
+
end
|
102
|
+
|
103
|
+
def get_attributes(options = nil)
|
104
|
+
return @client.raw("get", "/config/attributes", options)
|
48
105
|
end
|
49
106
|
end
|
50
107
|
end
|
data/lib/user.rb
CHANGED
@@ -11,7 +11,7 @@ module Mints
|
|
11
11
|
email: email,
|
12
12
|
password: password,
|
13
13
|
}
|
14
|
-
response = @client.raw("post", "/users/login", data, '/api/v1')
|
14
|
+
response = @client.raw("post", "/users/login", nil, data, '/api/v1')
|
15
15
|
if response.key? "api_token"
|
16
16
|
@client.session_token = response["api_token"]
|
17
17
|
end
|
@@ -19,157 +19,277 @@ module Mints
|
|
19
19
|
end
|
20
20
|
######################################### CRM #########################################
|
21
21
|
### Contacts ###
|
22
|
-
def get_contacts
|
23
|
-
return @client.get__crm__contacts
|
22
|
+
def get_contacts(options = nil)
|
23
|
+
return @client.get__crm__contacts(options)
|
24
24
|
end
|
25
25
|
|
26
|
-
def get_contact(id)
|
27
|
-
return @client.get__crm__contacts(id)
|
26
|
+
def get_contact(id, options = nil)
|
27
|
+
return @client.get__crm__contacts(id, options)
|
28
28
|
end
|
29
29
|
|
30
|
-
def create_contact(data)
|
31
|
-
return @client.create__crm__contacts(data)
|
30
|
+
def create_contact(data, options = nil)
|
31
|
+
return @client.create__crm__contacts(data, options)
|
32
32
|
end
|
33
33
|
|
34
|
-
def update_contact(id, data)
|
35
|
-
return @client.update__crm__contacts(id, data)
|
34
|
+
def update_contact(id, data, options = nil)
|
35
|
+
return @client.update__crm__contacts(id, data, options)
|
36
36
|
end
|
37
37
|
### Companies ###
|
38
|
-
def get_companies
|
39
|
-
return @client.get__crm__companies
|
38
|
+
def get_companies(options = nil)
|
39
|
+
return @client.get__crm__companies(options)
|
40
40
|
end
|
41
41
|
|
42
|
-
def get_company(id)
|
43
|
-
return @client.get__crm__companies(id)
|
42
|
+
def get_company(id, options = nil)
|
43
|
+
return @client.get__crm__companies(id, options)
|
44
44
|
end
|
45
45
|
|
46
|
-
def create_company(data)
|
47
|
-
return @client.create__crm__companies(data)
|
46
|
+
def create_company(data, options = nil)
|
47
|
+
return @client.create__crm__companies(data, options)
|
48
48
|
end
|
49
49
|
|
50
|
-
def update_company(id, data)
|
51
|
-
return @client.update__crm__companies(id, data)
|
50
|
+
def update_company(id, data, options = nil)
|
51
|
+
return @client.update__crm__companies(id, data, options)
|
52
52
|
end
|
53
53
|
|
54
54
|
### Deals ###
|
55
|
-
def get_deals
|
56
|
-
return @client.get__crm__deals
|
55
|
+
def get_deals(options = nil)
|
56
|
+
return @client.get__crm__deals(options)
|
57
57
|
end
|
58
58
|
|
59
|
-
def get_deal(id)
|
60
|
-
return @client.get__crm__deals(id)
|
59
|
+
def get_deal(id, options = nil)
|
60
|
+
return @client.get__crm__deals(id, options)
|
61
61
|
end
|
62
62
|
|
63
|
-
def create_deal(data)
|
64
|
-
return @client.create__crm__deals(data)
|
63
|
+
def create_deal(data, options = nil)
|
64
|
+
return @client.create__crm__deals(data, options)
|
65
65
|
end
|
66
66
|
|
67
|
-
def update_deal(id, data)
|
68
|
-
return @client.update__crm__deals(id, data)
|
67
|
+
def update_deal(id, data, options = nil)
|
68
|
+
return @client.update__crm__deals(id, data, options)
|
69
69
|
end
|
70
70
|
|
71
71
|
######################################### Content #########################################
|
72
72
|
### Stories ###
|
73
|
-
def get_stories
|
74
|
-
return @client.get__content__stories
|
73
|
+
def get_stories(options = nil)
|
74
|
+
return @client.get__content__stories(options)
|
75
75
|
end
|
76
76
|
|
77
|
-
def get_story(id)
|
78
|
-
return @client.get__content__stories(id)
|
77
|
+
def get_story(id, options = nil)
|
78
|
+
return @client.get__content__stories(id, options)
|
79
79
|
end
|
80
80
|
|
81
|
-
def create_story(data)
|
82
|
-
return @client.create__content__stories(data)
|
81
|
+
def create_story(data, options = nil)
|
82
|
+
return @client.create__content__stories(data, options)
|
83
83
|
end
|
84
84
|
|
85
|
-
def update_story(id, data)
|
86
|
-
return @client.update__content__stories(id, data)
|
85
|
+
def update_story(id, data, options = nil)
|
86
|
+
return @client.update__content__stories(id, data, options)
|
87
|
+
end
|
88
|
+
|
89
|
+
### Stories templates ###
|
90
|
+
def get_story_templates(options = nil)
|
91
|
+
return @client.get__content__story_templates(options)
|
92
|
+
end
|
93
|
+
|
94
|
+
def get_story_template(id, options = nil)
|
95
|
+
return @client.get__content__story_templates(id, options)
|
96
|
+
end
|
97
|
+
|
98
|
+
def create_story_template(data, options = nil)
|
99
|
+
return @client.create__content__story_templates(data, options)
|
100
|
+
end
|
101
|
+
|
102
|
+
def update_story_template(id, data, options = nil)
|
103
|
+
return @client.update__content__story_templates(id, data, options)
|
87
104
|
end
|
88
105
|
|
89
106
|
### Content instances ###
|
90
|
-
def get_content_instances
|
91
|
-
return @client.get__content__instances
|
107
|
+
def get_content_instances(options = nil)
|
108
|
+
return @client.get__content__instances(options)
|
92
109
|
end
|
93
110
|
|
94
|
-
def get_content_instance(id)
|
95
|
-
return @client.get__content__instances(id)
|
111
|
+
def get_content_instance(id, options = nil)
|
112
|
+
return @client.get__content__instances(id, options)
|
96
113
|
end
|
97
114
|
|
98
|
-
def create_content_instance(data)
|
99
|
-
return @client.create__content__instances(data)
|
115
|
+
def create_content_instance(data, options = nil)
|
116
|
+
return @client.create__content__instances(data, options)
|
100
117
|
end
|
101
118
|
|
102
|
-
def update_content_instance(id, data)
|
103
|
-
return @client.update__content__instances(id, data)
|
119
|
+
def update_content_instance(id, data, options = nil)
|
120
|
+
return @client.update__content__instances(id, data, options)
|
104
121
|
end
|
105
122
|
|
106
123
|
### Content pages ###
|
107
|
-
def get_content_pages
|
108
|
-
return @client.get__content__pages
|
124
|
+
def get_content_pages(options = nil)
|
125
|
+
return @client.get__content__pages(options)
|
109
126
|
end
|
110
127
|
|
111
|
-
def get_content_page(id)
|
112
|
-
return @client.get__content__pages(id)
|
128
|
+
def get_content_page(id, options = nil)
|
129
|
+
return @client.get__content__pages(id, options)
|
113
130
|
end
|
114
131
|
|
115
|
-
def create_content_page(data)
|
116
|
-
return @client.create__content__pages(data)
|
132
|
+
def create_content_page(data, options = nil)
|
133
|
+
return @client.create__content__pages(data, options)
|
117
134
|
end
|
118
135
|
|
119
|
-
def update_content_page(id, data)
|
120
|
-
return @client.update__content__pages(id, data)
|
136
|
+
def update_content_page(id, data, options = nil)
|
137
|
+
return @client.update__content__pages(id, data, options)
|
121
138
|
end
|
122
139
|
|
123
140
|
### Content templates ###
|
124
|
-
def get_content_templates
|
125
|
-
return @client.get__content__templates
|
141
|
+
def get_content_templates(options = nil)
|
142
|
+
return @client.get__content__templates(options)
|
126
143
|
end
|
127
144
|
|
128
|
-
def get_content_page(id)
|
129
|
-
return @client.get__content__templates(id)
|
145
|
+
def get_content_page(id, options = nil)
|
146
|
+
return @client.get__content__templates(id, options)
|
130
147
|
end
|
131
148
|
|
132
|
-
def create_content_page(data)
|
133
|
-
return @client.create__content__templates(data)
|
149
|
+
def create_content_page(data, options = nil)
|
150
|
+
return @client.create__content__templates(data, options)
|
134
151
|
end
|
135
152
|
|
136
|
-
def update_content_page(id, data)
|
137
|
-
return @client.update__content__templates(id, data)
|
153
|
+
def update_content_page(id, data, options = nil)
|
154
|
+
return @client.update__content__templates(id, data, options)
|
138
155
|
end
|
139
156
|
|
140
157
|
######################################### Ecommerce #########################################
|
141
158
|
### Products ###
|
142
|
-
def get_products
|
143
|
-
return @client.get__ecommerce__products
|
159
|
+
def get_products(options = nil)
|
160
|
+
return @client.get__ecommerce__products(options)
|
144
161
|
end
|
145
162
|
|
146
|
-
def get_product(id)
|
147
|
-
return @client.get__ecommerce__products(id)
|
163
|
+
def get_product(id, options = nil)
|
164
|
+
return @client.get__ecommerce__products(id, options)
|
148
165
|
end
|
149
166
|
|
150
|
-
def create_product(data)
|
151
|
-
return @client.create__ecommerce__products(data)
|
167
|
+
def create_product(data, options = nil)
|
168
|
+
return @client.create__ecommerce__products(data, options)
|
152
169
|
end
|
153
170
|
|
154
|
-
def update_product(id, data)
|
155
|
-
return @client.update__ecommerce__products(id, data)
|
171
|
+
def update_product(id, data, options = nil)
|
172
|
+
return @client.update__ecommerce__products(id, data, options)
|
156
173
|
end
|
157
174
|
|
175
|
+
### SKUs ###
|
176
|
+
def get_skus(options = nil)
|
177
|
+
return @client.get__ecommerce__skus(options)
|
178
|
+
end
|
179
|
+
|
180
|
+
def get_sku(id, options = nil)
|
181
|
+
return @client.get__ecommerce__skus(id, options)
|
182
|
+
end
|
183
|
+
|
184
|
+
def create_sku(data, options = nil)
|
185
|
+
return @client.create__ecommerce__skus(data, options)
|
186
|
+
end
|
187
|
+
|
188
|
+
def update_sku(id, data, options = nil)
|
189
|
+
return @client.update__ecommerce__skus(id, data, options)
|
190
|
+
end
|
191
|
+
|
192
|
+
### Prices ###
|
193
|
+
def get_prices(options = nil)
|
194
|
+
return @client.get__ecommerce__prices(options)
|
195
|
+
end
|
196
|
+
|
197
|
+
def get_price(id, options = nil)
|
198
|
+
return @client.get__ecommerce__prices(id, options)
|
199
|
+
end
|
200
|
+
|
201
|
+
def create_price(data, options = nil)
|
202
|
+
return @client.create__ecommerce__prices(data, options)
|
203
|
+
end
|
204
|
+
|
205
|
+
def update_price(id, data, options = nil)
|
206
|
+
return @client.update__ecommerce__prices(id, data, options)
|
207
|
+
end
|
208
|
+
|
209
|
+
### Price lists ###
|
210
|
+
def get_price_lists(options = nil)
|
211
|
+
return @client.get__ecommerce__price_lists(options)
|
212
|
+
end
|
213
|
+
|
214
|
+
def get_price_list(id, options = nil)
|
215
|
+
return @client.get__ecommerce__price_lists(id, options)
|
216
|
+
end
|
217
|
+
|
218
|
+
def create_price_list(data, options = nil)
|
219
|
+
return @client.create__ecommerce__price_lists(data, options)
|
220
|
+
end
|
221
|
+
|
222
|
+
def update_price_list(id, data, options = nil)
|
223
|
+
return @client.update__ecommerce__price_lists(id, data, options)
|
224
|
+
end
|
225
|
+
|
226
|
+
### Product brands ###
|
227
|
+
def get_product_brands(options = nil)
|
228
|
+
return @client.get__ecommerce__product_brands(options)
|
229
|
+
end
|
230
|
+
|
231
|
+
def get_prodict_brand(id, options = nil)
|
232
|
+
return @client.get__ecommerce__product_brands(id, options)
|
233
|
+
end
|
234
|
+
|
235
|
+
def create_prodict_brand(data, options = nil)
|
236
|
+
return @client.create__ecommerce__product_brands(data, options)
|
237
|
+
end
|
238
|
+
|
239
|
+
def update_product_brand(id, data, options = nil)
|
240
|
+
return @client.update__ecommerce__product_brands(id, data, options)
|
241
|
+
end
|
242
|
+
|
243
|
+
### Product types ###
|
244
|
+
def get_product_types(options = nil)
|
245
|
+
return @client.get__ecommerce__product_types(options)
|
246
|
+
end
|
247
|
+
|
248
|
+
def get_prodict_type(id, options = nil)
|
249
|
+
return @client.get__ecommerce__product_types(id, options)
|
250
|
+
end
|
251
|
+
|
252
|
+
def create_prodict_type(data, options = nil)
|
253
|
+
return @client.create__ecommerce__product_types(data, options)
|
254
|
+
end
|
255
|
+
|
256
|
+
def update_product_type(id, data, options = nil)
|
257
|
+
return @client.update__ecommerce__product_types(id, data, options)
|
258
|
+
end
|
259
|
+
|
260
|
+
### Product templates ###
|
261
|
+
def get_product_templates(options = nil)
|
262
|
+
return @client.get__ecommerce__product_templates(options)
|
263
|
+
end
|
264
|
+
|
265
|
+
def get_prodict_template(id, options = nil)
|
266
|
+
return @client.get__ecommerce__product_templates(id, options)
|
267
|
+
end
|
268
|
+
|
269
|
+
def create_prodict_template(data, options = nil)
|
270
|
+
return @client.create__ecommerce__product_templates(data, options)
|
271
|
+
end
|
272
|
+
|
273
|
+
def update_product_template(id, data, options = nil)
|
274
|
+
return @client.update__ecommerce__product_templates(id, data, options)
|
275
|
+
end
|
276
|
+
|
277
|
+
|
158
278
|
### Locations ###
|
159
|
-
def get_locations
|
160
|
-
return @client.get__ecommerce__locations
|
279
|
+
def get_locations(options = nil)
|
280
|
+
return @client.get__ecommerce__locations(options)
|
161
281
|
end
|
162
282
|
|
163
|
-
def get_location(id)
|
164
|
-
return @client.get__ecommerce__locations(id)
|
283
|
+
def get_location(id, options = nil)
|
284
|
+
return @client.get__ecommerce__locations(id, options)
|
165
285
|
end
|
166
286
|
|
167
|
-
def create_location(data)
|
168
|
-
return @client.create__ecommerce__locations(data)
|
287
|
+
def create_location(data, options = nil)
|
288
|
+
return @client.create__ecommerce__locations(data, options)
|
169
289
|
end
|
170
290
|
|
171
|
-
def update_location(id, data)
|
172
|
-
return @client.update__ecommerce__locations(id, data)
|
291
|
+
def update_location(id, data, options = nil)
|
292
|
+
return @client.update__ecommerce__locations(id, data, options)
|
173
293
|
end
|
174
294
|
end
|
175
295
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mints
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Ruben Gomez Garcia, Omar Mora
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|