clayful 2.4.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,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/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.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/catalogs/{catalogId}',
49
49
  'params' => ['catalogId', ],
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/catalogs',
62
- 'params' => [],
59
+ 'method_name' => 'delete_metafield',
60
+ 'http_method' => 'DELETE',
61
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}',
62
+ 'params' => ['catalogId', '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/catalogs/{catalogId}/meta/{field}/push',
75
- 'params' => ['catalogId', 'field', ],
72
+ 'method_name' => 'get',
73
+ 'http_method' => 'GET',
74
+ 'path' => '/v1/catalogs/{catalogId}',
75
+ 'params' => ['catalogId', ],
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/catalogs/{catalogId}/meta/{field}/pull',
101
- 'params' => ['catalogId', 'field', ],
98
+ 'method_name' => 'list',
99
+ 'http_method' => 'GET',
100
+ 'path' => '/v1/catalogs',
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/catalogs/{catalogId}',
114
- 'params' => ['catalogId', ],
111
+ 'method_name' => 'pull_from_metafield',
112
+ 'http_method' => 'POST',
113
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}/pull',
114
+ 'params' => ['catalogId', '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/catalogs/{catalogId}',
127
- 'params' => ['catalogId', ],
124
+ 'method_name' => 'push_to_metafield',
125
+ 'http_method' => 'POST',
126
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}/push',
127
+ 'params' => ['catalogId', '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/catalogs/{catalogId}/meta/{field}',
140
- 'params' => ['catalogId', 'field', ],
137
+ 'method_name' => 'update',
138
+ 'http_method' => 'PUT',
139
+ 'path' => '/v1/catalogs/{catalogId}',
140
+ 'params' => ['catalogId', ],
141
141
  'args' => args
142
142
  })
143
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.pull_from_metafield(*args)
68
+ def self.get(*args)
69
69
 
70
70
  Clayful.call_api({
71
71
  'model_name' => @@name,
72
- 'method_name' => 'pull_from_metafield',
73
- 'http_method' => 'POST',
74
- 'path' => '/v1/collections/{collectionId}/meta/{field}/pull',
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.push_to_metafield(*args)
94
+ def self.list(*args)
95
95
 
96
96
  Clayful.call_api({
97
97
  'model_name' => @@name,
98
- 'method_name' => 'push_to_metafield',
99
- 'http_method' => 'POST',
100
- 'path' => '/v1/collections/{collectionId}/meta/{field}/push',
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,6 +39,45 @@ module Clayful
39
39
 
40
40
  end
41
41
 
42
+ def self.create(*args)
43
+
44
+ Clayful.call_api({
45
+ 'model_name' => @@name,
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',
61
+ 'path' => '/v1/coupons/{couponId}',
62
+ 'params' => ['couponId', ],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
68
+ def self.delete_metafield(*args)
69
+
70
+ Clayful.call_api({
71
+ 'model_name' => @@name,
72
+ 'method_name' => 'delete_metafield',
73
+ 'http_method' => 'DELETE',
74
+ 'path' => '/v1/coupons/{couponId}/meta/{field}',
75
+ 'params' => ['couponId', 'field', ],
76
+ 'args' => args
77
+ })
78
+
79
+ end
80
+
42
81
  def self.get(*args)
43
82
 
44
83
  Clayful.call_api({
@@ -52,26 +91,39 @@ module Clayful
52
91
 
53
92
  end
54
93
 
55
- def self.pull_from_metafield(*args)
94
+ def self.increase_metafield(*args)
56
95
 
57
96
  Clayful.call_api({
58
97
  'model_name' => @@name,
59
- 'method_name' => 'pull_from_metafield',
98
+ 'method_name' => 'increase_metafield',
60
99
  'http_method' => 'POST',
61
- 'path' => '/v1/coupons/{couponId}/meta/{field}/pull',
100
+ 'path' => '/v1/coupons/{couponId}/meta/{field}/inc',
62
101
  'params' => ['couponId', 'field', ],
63
102
  'args' => args
64
103
  })
65
104
 
66
105
  end
67
106
 
68
- def self.increase_metafield(*args)
107
+ def self.list(*args)
69
108
 
70
109
  Clayful.call_api({
71
110
  'model_name' => @@name,
72
- 'method_name' => 'increase_metafield',
111
+ 'method_name' => 'list',
112
+ 'http_method' => 'GET',
113
+ 'path' => '/v1/coupons',
114
+ 'params' => [],
115
+ 'args' => args
116
+ })
117
+
118
+ end
119
+
120
+ def self.pull_from_metafield(*args)
121
+
122
+ Clayful.call_api({
123
+ 'model_name' => @@name,
124
+ 'method_name' => 'pull_from_metafield',
73
125
  'http_method' => 'POST',
74
- 'path' => '/v1/coupons/{couponId}/meta/{field}/inc',
126
+ 'path' => '/v1/coupons/{couponId}/meta/{field}/pull',
75
127
  'params' => ['couponId', 'field', ],
76
128
  'args' => args
77
129
  })
@@ -91,14 +143,14 @@ module Clayful
91
143
 
92
144
  end
93
145
 
94
- def self.delete_metafield(*args)
146
+ def self.update(*args)
95
147
 
96
148
  Clayful.call_api({
97
149
  'model_name' => @@name,
98
- 'method_name' => 'delete_metafield',
99
- 'http_method' => 'DELETE',
100
- 'path' => '/v1/coupons/{couponId}/meta/{field}',
101
- 'params' => ['couponId', 'field', ],
150
+ 'method_name' => 'update',
151
+ 'http_method' => 'PUT',
152
+ 'path' => '/v1/coupons/{couponId}',
153
+ 'params' => ['couponId', ],
102
154
  'args' => args
103
155
  })
104
156