clayful 2.2.1 → 2.5.0

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.
@@ -13,32 +13,58 @@ module Clayful
13
13
  @@path
14
14
  end
15
15
 
16
- def self.list(*args)
16
+ def self.count(*args)
17
17
 
18
18
  Clayful.call_api({
19
19
  'model_name' => @@name,
20
- 'method_name' => 'list',
20
+ 'method_name' => 'count',
21
21
  'http_method' => 'GET',
22
- 'path' => '/v1/catalogs',
22
+ 'path' => '/v1/catalogs/count',
23
23
  'params' => [],
24
24
  'args' => args
25
25
  })
26
26
 
27
27
  end
28
28
 
29
- def self.count(*args)
29
+ def self.create(*args)
30
30
 
31
31
  Clayful.call_api({
32
32
  'model_name' => @@name,
33
- 'method_name' => 'count',
34
- 'http_method' => 'GET',
35
- 'path' => '/v1/catalogs/count',
33
+ 'method_name' => 'create',
34
+ 'http_method' => 'POST',
35
+ 'path' => '/v1/catalogs',
36
36
  'params' => [],
37
37
  'args' => args
38
38
  })
39
39
 
40
40
  end
41
41
 
42
+ def self.delete(*args)
43
+
44
+ Clayful.call_api({
45
+ 'model_name' => @@name,
46
+ 'method_name' => 'delete',
47
+ 'http_method' => 'DELETE',
48
+ 'path' => '/v1/catalogs/{catalogId}',
49
+ 'params' => ['catalogId', ],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ def self.delete_metafield(*args)
56
+
57
+ Clayful.call_api({
58
+ 'model_name' => @@name,
59
+ 'method_name' => 'delete_metafield',
60
+ 'http_method' => 'DELETE',
61
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}',
62
+ 'params' => ['catalogId', 'field', ],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
42
68
  def self.get(*args)
43
69
 
44
70
  Clayful.call_api({
@@ -52,53 +78,66 @@ module Clayful
52
78
 
53
79
  end
54
80
 
55
- def self.pull_from_metafield(*args)
81
+ def self.increase_metafield(*args)
56
82
 
57
83
  Clayful.call_api({
58
84
  'model_name' => @@name,
59
- 'method_name' => 'pull_from_metafield',
85
+ 'method_name' => 'increase_metafield',
60
86
  'http_method' => 'POST',
61
- 'path' => '/v1/catalogs/{catalogId}/meta/{field}/pull',
87
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}/inc',
62
88
  'params' => ['catalogId', 'field', ],
63
89
  'args' => args
64
90
  })
65
91
 
66
92
  end
67
93
 
68
- def self.push_to_metafield(*args)
94
+ def self.list(*args)
69
95
 
70
96
  Clayful.call_api({
71
97
  'model_name' => @@name,
72
- 'method_name' => 'push_to_metafield',
98
+ 'method_name' => 'list',
99
+ 'http_method' => 'GET',
100
+ 'path' => '/v1/catalogs',
101
+ 'params' => [],
102
+ 'args' => args
103
+ })
104
+
105
+ end
106
+
107
+ def self.pull_from_metafield(*args)
108
+
109
+ Clayful.call_api({
110
+ 'model_name' => @@name,
111
+ 'method_name' => 'pull_from_metafield',
73
112
  'http_method' => 'POST',
74
- 'path' => '/v1/catalogs/{catalogId}/meta/{field}/push',
113
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}/pull',
75
114
  'params' => ['catalogId', 'field', ],
76
115
  'args' => args
77
116
  })
78
117
 
79
118
  end
80
119
 
81
- def self.increase_metafield(*args)
120
+ def self.push_to_metafield(*args)
82
121
 
83
122
  Clayful.call_api({
84
123
  'model_name' => @@name,
85
- 'method_name' => 'increase_metafield',
124
+ 'method_name' => 'push_to_metafield',
86
125
  'http_method' => 'POST',
87
- 'path' => '/v1/catalogs/{catalogId}/meta/{field}/inc',
126
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}/push',
88
127
  'params' => ['catalogId', 'field', ],
89
128
  'args' => args
90
129
  })
91
130
 
92
131
  end
93
132
 
94
- def self.delete_metafield(*args)
133
+ def self.update(*args)
95
134
 
96
135
  Clayful.call_api({
97
136
  'model_name' => @@name,
98
- 'method_name' => 'delete_metafield',
99
- 'http_method' => 'DELETE',
100
- 'path' => '/v1/catalogs/{catalogId}/meta/{field}',
101
- 'params' => ['catalogId', 'field', ],
137
+ 'method_name' => 'update',
138
+ 'http_method' => 'PUT',
139
+ 'path' => '/v1/catalogs/{catalogId}',
140
+ 'params' => ['catalogId', ],
102
141
  'args' => args
103
142
  })
104
143
 
@@ -13,38 +13,38 @@ module Clayful
13
13
  @@path
14
14
  end
15
15
 
16
- def self.list(*args)
16
+ def self.count(*args)
17
17
 
18
18
  Clayful.call_api({
19
19
  'model_name' => @@name,
20
- 'method_name' => 'list',
20
+ 'method_name' => 'count',
21
21
  'http_method' => 'GET',
22
- 'path' => '/v1/collections',
22
+ 'path' => '/v1/collections/count',
23
23
  'params' => [],
24
24
  'args' => args
25
25
  })
26
26
 
27
27
  end
28
28
 
29
- def self.count(*args)
29
+ def self.create(*args)
30
30
 
31
31
  Clayful.call_api({
32
32
  'model_name' => @@name,
33
- 'method_name' => 'count',
34
- 'http_method' => 'GET',
35
- 'path' => '/v1/collections/count',
33
+ 'method_name' => 'create',
34
+ 'http_method' => 'POST',
35
+ 'path' => '/v1/collections',
36
36
  'params' => [],
37
37
  'args' => args
38
38
  })
39
39
 
40
40
  end
41
41
 
42
- def self.get(*args)
42
+ def self.delete(*args)
43
43
 
44
44
  Clayful.call_api({
45
45
  'model_name' => @@name,
46
- 'method_name' => 'get',
47
- 'http_method' => 'GET',
46
+ 'method_name' => 'delete',
47
+ 'http_method' => 'DELETE',
48
48
  'path' => '/v1/collections/{collectionId}',
49
49
  'params' => ['collectionId', ],
50
50
  'args' => args
@@ -52,27 +52,27 @@ module Clayful
52
52
 
53
53
  end
54
54
 
55
- def self.create(*args)
55
+ def self.delete_metafield(*args)
56
56
 
57
57
  Clayful.call_api({
58
58
  'model_name' => @@name,
59
- 'method_name' => 'create',
60
- 'http_method' => 'POST',
61
- 'path' => '/v1/collections',
62
- 'params' => [],
59
+ 'method_name' => 'delete_metafield',
60
+ 'http_method' => 'DELETE',
61
+ 'path' => '/v1/collections/{collectionId}/meta/{field}',
62
+ 'params' => ['collectionId', 'field', ],
63
63
  'args' => args
64
64
  })
65
65
 
66
66
  end
67
67
 
68
- def self.push_to_metafield(*args)
68
+ def self.get(*args)
69
69
 
70
70
  Clayful.call_api({
71
71
  'model_name' => @@name,
72
- 'method_name' => 'push_to_metafield',
73
- 'http_method' => 'POST',
74
- 'path' => '/v1/collections/{collectionId}/meta/{field}/push',
75
- 'params' => ['collectionId', 'field', ],
72
+ 'method_name' => 'get',
73
+ 'http_method' => 'GET',
74
+ 'path' => '/v1/collections/{collectionId}',
75
+ 'params' => ['collectionId', ],
76
76
  'args' => args
77
77
  })
78
78
 
@@ -91,53 +91,53 @@ module Clayful
91
91
 
92
92
  end
93
93
 
94
- def self.pull_from_metafield(*args)
94
+ def self.list(*args)
95
95
 
96
96
  Clayful.call_api({
97
97
  'model_name' => @@name,
98
- 'method_name' => 'pull_from_metafield',
99
- 'http_method' => 'POST',
100
- 'path' => '/v1/collections/{collectionId}/meta/{field}/pull',
101
- 'params' => ['collectionId', 'field', ],
98
+ 'method_name' => 'list',
99
+ 'http_method' => 'GET',
100
+ 'path' => '/v1/collections',
101
+ 'params' => [],
102
102
  'args' => args
103
103
  })
104
104
 
105
105
  end
106
106
 
107
- def self.update(*args)
107
+ def self.pull_from_metafield(*args)
108
108
 
109
109
  Clayful.call_api({
110
110
  'model_name' => @@name,
111
- 'method_name' => 'update',
112
- 'http_method' => 'PUT',
113
- 'path' => '/v1/collections/{collectionId}',
114
- 'params' => ['collectionId', ],
111
+ 'method_name' => 'pull_from_metafield',
112
+ 'http_method' => 'POST',
113
+ 'path' => '/v1/collections/{collectionId}/meta/{field}/pull',
114
+ 'params' => ['collectionId', 'field', ],
115
115
  'args' => args
116
116
  })
117
117
 
118
118
  end
119
119
 
120
- def self.delete(*args)
120
+ def self.push_to_metafield(*args)
121
121
 
122
122
  Clayful.call_api({
123
123
  'model_name' => @@name,
124
- 'method_name' => 'delete',
125
- 'http_method' => 'DELETE',
126
- 'path' => '/v1/collections/{collectionId}',
127
- 'params' => ['collectionId', ],
124
+ 'method_name' => 'push_to_metafield',
125
+ 'http_method' => 'POST',
126
+ 'path' => '/v1/collections/{collectionId}/meta/{field}/push',
127
+ 'params' => ['collectionId', 'field', ],
128
128
  'args' => args
129
129
  })
130
130
 
131
131
  end
132
132
 
133
- def self.delete_metafield(*args)
133
+ def self.update(*args)
134
134
 
135
135
  Clayful.call_api({
136
136
  'model_name' => @@name,
137
- 'method_name' => 'delete_metafield',
138
- 'http_method' => 'DELETE',
139
- 'path' => '/v1/collections/{collectionId}/meta/{field}',
140
- 'params' => ['collectionId', 'field', ],
137
+ 'method_name' => 'update',
138
+ 'http_method' => 'PUT',
139
+ 'path' => '/v1/collections/{collectionId}',
140
+ 'params' => ['collectionId', ],
141
141
  'args' => args
142
142
  })
143
143
 
@@ -13,40 +13,40 @@ module Clayful
13
13
  @@path
14
14
  end
15
15
 
16
- def self.list(*args)
16
+ def self.count(*args)
17
17
 
18
18
  Clayful.call_api({
19
19
  'model_name' => @@name,
20
- 'method_name' => 'list',
20
+ 'method_name' => 'count',
21
21
  'http_method' => 'GET',
22
- 'path' => '/v1/countries',
22
+ 'path' => '/v1/countries/count',
23
23
  'params' => [],
24
24
  'args' => args
25
25
  })
26
26
 
27
27
  end
28
28
 
29
- def self.count(*args)
29
+ def self.get(*args)
30
30
 
31
31
  Clayful.call_api({
32
32
  'model_name' => @@name,
33
- 'method_name' => 'count',
33
+ 'method_name' => 'get',
34
34
  'http_method' => 'GET',
35
- 'path' => '/v1/countries/count',
36
- 'params' => [],
35
+ 'path' => '/v1/countries/{countryId}',
36
+ 'params' => ['countryId', ],
37
37
  'args' => args
38
38
  })
39
39
 
40
40
  end
41
41
 
42
- def self.get(*args)
42
+ def self.list(*args)
43
43
 
44
44
  Clayful.call_api({
45
45
  'model_name' => @@name,
46
- 'method_name' => 'get',
46
+ 'method_name' => 'list',
47
47
  'http_method' => 'GET',
48
- 'path' => '/v1/countries/{countryId}',
49
- 'params' => ['countryId', ],
48
+ 'path' => '/v1/countries',
49
+ 'params' => [],
50
50
  'args' => args
51
51
  })
52
52
 
data/lib/models/coupon.rb CHANGED
@@ -13,14 +13,14 @@ module Clayful
13
13
  @@path
14
14
  end
15
15
 
16
- def self.list(*args)
16
+ def self.add_total_amount(*args)
17
17
 
18
18
  Clayful.call_api({
19
19
  'model_name' => @@name,
20
- 'method_name' => 'list',
21
- 'http_method' => 'GET',
22
- 'path' => '/v1/coupons',
23
- 'params' => [],
20
+ 'method_name' => 'add_total_amount',
21
+ 'http_method' => 'POST',
22
+ 'path' => '/v1/coupons/{couponId}/amount/total',
23
+ 'params' => ['couponId', ],
24
24
  'args' => args
25
25
  })
26
26
 
@@ -39,12 +39,25 @@ module Clayful
39
39
 
40
40
  end
41
41
 
42
- def self.get(*args)
42
+ def self.create(*args)
43
43
 
44
44
  Clayful.call_api({
45
45
  'model_name' => @@name,
46
- 'method_name' => 'get',
47
- 'http_method' => 'GET',
46
+ 'method_name' => 'create',
47
+ 'http_method' => 'POST',
48
+ 'path' => '/v1/coupons',
49
+ 'params' => [],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ def self.delete(*args)
56
+
57
+ Clayful.call_api({
58
+ 'model_name' => @@name,
59
+ 'method_name' => 'delete',
60
+ 'http_method' => 'DELETE',
48
61
  'path' => '/v1/coupons/{couponId}',
49
62
  'params' => ['couponId', ],
50
63
  'args' => args
@@ -52,19 +65,32 @@ module Clayful
52
65
 
53
66
  end
54
67
 
55
- def self.push_to_metafield(*args)
68
+ def self.delete_metafield(*args)
56
69
 
57
70
  Clayful.call_api({
58
71
  'model_name' => @@name,
59
- 'method_name' => 'push_to_metafield',
60
- 'http_method' => 'POST',
61
- 'path' => '/v1/coupons/{couponId}/meta/{field}/push',
72
+ 'method_name' => 'delete_metafield',
73
+ 'http_method' => 'DELETE',
74
+ 'path' => '/v1/coupons/{couponId}/meta/{field}',
62
75
  'params' => ['couponId', 'field', ],
63
76
  'args' => args
64
77
  })
65
78
 
66
79
  end
67
80
 
81
+ def self.get(*args)
82
+
83
+ Clayful.call_api({
84
+ 'model_name' => @@name,
85
+ 'method_name' => 'get',
86
+ 'http_method' => 'GET',
87
+ 'path' => '/v1/coupons/{couponId}',
88
+ 'params' => ['couponId', ],
89
+ 'args' => args
90
+ })
91
+
92
+ end
93
+
68
94
  def self.increase_metafield(*args)
69
95
 
70
96
  Clayful.call_api({
@@ -78,6 +104,19 @@ module Clayful
78
104
 
79
105
  end
80
106
 
107
+ def self.list(*args)
108
+
109
+ Clayful.call_api({
110
+ 'model_name' => @@name,
111
+ 'method_name' => 'list',
112
+ 'http_method' => 'GET',
113
+ 'path' => '/v1/coupons',
114
+ 'params' => [],
115
+ 'args' => args
116
+ })
117
+
118
+ end
119
+
81
120
  def self.pull_from_metafield(*args)
82
121
 
83
122
  Clayful.call_api({
@@ -91,19 +130,32 @@ module Clayful
91
130
 
92
131
  end
93
132
 
94
- def self.delete_metafield(*args)
133
+ def self.push_to_metafield(*args)
95
134
 
96
135
  Clayful.call_api({
97
136
  'model_name' => @@name,
98
- 'method_name' => 'delete_metafield',
99
- 'http_method' => 'DELETE',
100
- 'path' => '/v1/coupons/{couponId}/meta/{field}',
137
+ 'method_name' => 'push_to_metafield',
138
+ 'http_method' => 'POST',
139
+ 'path' => '/v1/coupons/{couponId}/meta/{field}/push',
101
140
  'params' => ['couponId', 'field', ],
102
141
  'args' => args
103
142
  })
104
143
 
105
144
  end
106
145
 
146
+ def self.update(*args)
147
+
148
+ Clayful.call_api({
149
+ 'model_name' => @@name,
150
+ 'method_name' => 'update',
151
+ 'http_method' => 'PUT',
152
+ 'path' => '/v1/coupons/{couponId}',
153
+ 'params' => ['couponId', ],
154
+ 'args' => args
155
+ })
156
+
157
+ end
158
+
107
159
  end
108
160
 
109
161
  end