Class: Clayful::Cart
- Inherits:
-
Object
- Object
- Clayful::Cart
- Defined in:
- lib/models/cart.rb
Constant Summary collapse
- @@name =
'Cart'- @@path =
''
Class Method Summary collapse
- .add_item(*args) ⇒ Object
- .add_item_for_me(*args) ⇒ Object
- .checkout(*args) ⇒ Object
- .checkout_as_non_registered(*args) ⇒ Object
- .checkout_as_non_registered_for_me(*args) ⇒ Object
- .checkout_for_me(*args) ⇒ Object
- .count_items(*args) ⇒ Object
- .count_items_for_me(*args) ⇒ Object
- .delete_item(*args) ⇒ Object
- .delete_item_for_me(*args) ⇒ Object
- .empty(*args) ⇒ Object
- .empty_for_me(*args) ⇒ Object
- .get(*args) ⇒ Object
- .get_as_non_registered(*args) ⇒ Object
- .get_as_non_registered_for_me(*args) ⇒ Object
- .get_for_me(*args) ⇒ Object
- .name ⇒ Object
- .path ⇒ Object
- .update_item(*args) ⇒ Object
- .update_item_for_me(*args) ⇒ Object
Class Method Details
.add_item(*args) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/models/cart.rb', line 16 def self.add_item(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'add_item', 'http_method' => 'POST', 'path' => '/v1/customers/{customerId}/cart/items', 'params' => ['customerId', ], 'args' => args }) end |
.add_item_for_me(*args) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/models/cart.rb', line 29 def self.add_item_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'add_item_for_me', 'http_method' => 'POST', 'path' => '/v1/me/cart/items', 'params' => [], 'args' => args }) end |
.checkout(*args) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/models/cart.rb', line 42 def self.checkout(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'checkout', 'http_method' => 'POST', 'path' => '/v1/customers/{customerId}/cart/checkout/{type}', 'params' => ['customerId', 'type', ], 'args' => args }) end |
.checkout_as_non_registered(*args) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/models/cart.rb', line 55 def self.checkout_as_non_registered(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'checkout_as_non_registered', 'http_method' => 'POST', 'path' => '/v1/customers/non-registered/cart/checkout/{type}', 'params' => ['type', ], 'args' => args }) end |
.checkout_as_non_registered_for_me(*args) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/models/cart.rb', line 68 def self.checkout_as_non_registered_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'checkout_as_non_registered_for_me', 'http_method' => 'POST', 'path' => '/v1/me/non-registered/cart/checkout/{type}', 'params' => ['type', ], 'args' => args }) end |
.checkout_for_me(*args) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/models/cart.rb', line 81 def self.checkout_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'checkout_for_me', 'http_method' => 'POST', 'path' => '/v1/me/cart/checkout/{type}', 'params' => ['type', ], 'args' => args }) end |
.count_items(*args) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/models/cart.rb', line 94 def self.count_items(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'count_items', 'http_method' => 'GET', 'path' => '/v1/customers/{customerId}/cart/items/count', 'params' => ['customerId', ], 'args' => args }) end |
.count_items_for_me(*args) ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/models/cart.rb', line 107 def self.count_items_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'count_items_for_me', 'http_method' => 'GET', 'path' => '/v1/me/cart/items/count', 'params' => [], 'args' => args }) end |
.delete_item(*args) ⇒ Object
120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/models/cart.rb', line 120 def self.delete_item(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'delete_item', 'http_method' => 'DELETE', 'path' => '/v1/customers/{customerId}/cart/items/{itemId}', 'params' => ['customerId', 'itemId', ], 'args' => args }) end |
.delete_item_for_me(*args) ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/models/cart.rb', line 133 def self.delete_item_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'delete_item_for_me', 'http_method' => 'DELETE', 'path' => '/v1/me/cart/items/{itemId}', 'params' => ['itemId', ], 'args' => args }) end |
.empty(*args) ⇒ Object
146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/models/cart.rb', line 146 def self.empty(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'empty', 'http_method' => 'DELETE', 'path' => '/v1/customers/{customerId}/cart/items', 'params' => ['customerId', ], 'args' => args }) end |
.empty_for_me(*args) ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/models/cart.rb', line 159 def self.empty_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'empty_for_me', 'http_method' => 'DELETE', 'path' => '/v1/me/cart/items', 'params' => [], 'args' => args }) end |
.get(*args) ⇒ Object
172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/models/cart.rb', line 172 def self.get(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'get', 'http_method' => 'POST', 'path' => '/v1/customers/{customerId}/cart', 'params' => ['customerId', ], 'args' => args }) end |
.get_as_non_registered(*args) ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/models/cart.rb', line 185 def self.get_as_non_registered(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'get_as_non_registered', 'http_method' => 'POST', 'path' => '/v1/customers/non-registered/cart', 'params' => [], 'args' => args }) end |
.get_as_non_registered_for_me(*args) ⇒ Object
198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/models/cart.rb', line 198 def self.get_as_non_registered_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'get_as_non_registered_for_me', 'http_method' => 'POST', 'path' => '/v1/me/non-registered/cart', 'params' => [], 'args' => args }) end |
.get_for_me(*args) ⇒ Object
211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/models/cart.rb', line 211 def self.get_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'get_for_me', 'http_method' => 'POST', 'path' => '/v1/me/cart', 'params' => [], 'args' => args }) end |
.name ⇒ Object
8 9 10 |
# File 'lib/models/cart.rb', line 8 def self.name @@name end |
.path ⇒ Object
12 13 14 |
# File 'lib/models/cart.rb', line 12 def self.path @@path end |
.update_item(*args) ⇒ Object
224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/models/cart.rb', line 224 def self.update_item(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'update_item', 'http_method' => 'PUT', 'path' => '/v1/customers/{customerId}/cart/items/{itemId}', 'params' => ['customerId', 'itemId', ], 'args' => args }) end |
.update_item_for_me(*args) ⇒ Object
237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/models/cart.rb', line 237 def self.update_item_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'update_item_for_me', 'http_method' => 'PUT', 'path' => '/v1/me/cart/items/{itemId}', 'params' => ['itemId', ], 'args' => args }) end |