Class: Clayful::Customer
- Inherits:
-
Object
- Object
- Clayful::Customer
- Defined in:
- lib/models/customer.rb
Constant Summary collapse
- @@name =
'Customer'
- @@path =
'customers'
Class Method Summary collapse
- .add_coupon(*args) ⇒ Object
- .authenticate(*args) ⇒ Object
- .authenticate_by_3rd_party(*args) ⇒ Object
- .count(*args) ⇒ Object
- .count_coupons(*args) ⇒ Object
- .count_coupons_for_me(*args) ⇒ Object
- .create(*args) ⇒ Object
- .create_me(*args) ⇒ Object
- .create_verification(*args) ⇒ Object
- .delete(*args) ⇒ Object
- .delete_coupon(*args) ⇒ Object
- .delete_coupon_for_me(*args) ⇒ Object
- .delete_me(*args) ⇒ Object
- .delete_metafield(*args) ⇒ Object
- .get(*args) ⇒ Object
- .get_me(*args) ⇒ Object
- .increase_metafield(*args) ⇒ Object
- .is_authenticated(*args) ⇒ Object
- .list(*args) ⇒ Object
- .list_by_flag_votes(*args) ⇒ Object
- .list_by_help_votes(*args) ⇒ Object
- .list_coupons(*args) ⇒ Object
- .list_coupons_for_me(*args) ⇒ Object
- .name ⇒ Object
- .path ⇒ Object
- .pull_from_metafield(*args) ⇒ Object
- .push_to_metafield(*args) ⇒ Object
- .recover_credential(*args) ⇒ Object
- .request_verification(*args) ⇒ Object
- .request_verification_email(*args) ⇒ Object
- .reset_password(*args) ⇒ Object
- .update(*args) ⇒ Object
- .update_credentials(*args) ⇒ Object
- .update_credentials_for_me(*args) ⇒ Object
- .update_me(*args) ⇒ Object
- .verify(*args) ⇒ Object
Class Method Details
.add_coupon(*args) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/models/customer.rb', line 16 def self.add_coupon(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'add_coupon', 'http_method' => 'POST', 'path' => '/v1/customers/{customerId}/coupons', 'params' => ['customerId', ], 'args' => args }) end |
.authenticate(*args) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/models/customer.rb', line 29 def self.authenticate(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'authenticate', 'http_method' => 'POST', 'path' => '/v1/customers/auth', 'params' => [], 'args' => args }) end |
.authenticate_by_3rd_party(*args) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/models/customer.rb', line 42 def self.authenticate_by_3rd_party(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'authenticate_by_3rd_party', 'http_method' => 'POST', 'path' => '/v1/customers/auth/{vendor}', 'params' => ['vendor', ], 'args' => args }) end |
.count(*args) ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/models/customer.rb', line 55 def self.count(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'count', 'http_method' => 'GET', 'path' => '/v1/customers/count', 'params' => [], 'args' => args }) end |
.count_coupons(*args) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/models/customer.rb', line 68 def self.count_coupons(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'count_coupons', 'http_method' => 'GET', 'path' => '/v1/customers/{customerId}/coupons/count', 'params' => ['customerId', ], 'args' => args }) end |
.count_coupons_for_me(*args) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/models/customer.rb', line 81 def self.count_coupons_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'count_coupons_for_me', 'http_method' => 'GET', 'path' => '/v1/me/coupons/count', 'params' => [], 'args' => args }) end |
.create(*args) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/models/customer.rb', line 94 def self.create(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'create', 'http_method' => 'POST', 'path' => '/v1/customers', 'params' => [], 'args' => args }) end |
.create_me(*args) ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/models/customer.rb', line 107 def self.create_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'create_me', 'http_method' => 'POST', 'path' => '/v1/me', 'params' => [], 'args' => args }) end |
.create_verification(*args) ⇒ Object
120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/models/customer.rb', line 120 def self.create_verification(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'create_verification', 'http_method' => 'POST', 'path' => '/v1/customers/verifications', 'params' => [], 'args' => args }) end |
.delete(*args) ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/models/customer.rb', line 133 def self.delete(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'delete', 'http_method' => 'DELETE', 'path' => '/v1/customers/{customerId}', 'params' => ['customerId', ], 'args' => args }) end |
.delete_coupon(*args) ⇒ Object
146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/models/customer.rb', line 146 def self.delete_coupon(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'delete_coupon', 'http_method' => 'DELETE', 'path' => '/v1/customers/{customerId}/coupons/{couponId}', 'params' => ['customerId', 'couponId', ], 'args' => args }) end |
.delete_coupon_for_me(*args) ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/models/customer.rb', line 159 def self.delete_coupon_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'delete_coupon_for_me', 'http_method' => 'DELETE', 'path' => '/v1/me/coupons/{couponId}', 'params' => ['couponId', ], 'args' => args }) end |
.delete_me(*args) ⇒ Object
172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/models/customer.rb', line 172 def self.delete_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'delete_me', 'http_method' => 'DELETE', 'path' => '/v1/me', 'params' => [], 'args' => args }) end |
.delete_metafield(*args) ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/models/customer.rb', line 185 def self.(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'delete_metafield', 'http_method' => 'DELETE', 'path' => '/v1/customers/{customerId}/meta/{field}', 'params' => ['customerId', 'field', ], 'args' => args }) end |
.get(*args) ⇒ Object
198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/models/customer.rb', line 198 def self.get(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'get', 'http_method' => 'GET', 'path' => '/v1/customers/{customerId}', 'params' => ['customerId', ], 'args' => args }) end |
.get_me(*args) ⇒ Object
211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/models/customer.rb', line 211 def self.get_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'get_me', 'http_method' => 'GET', 'path' => '/v1/me', 'params' => [], 'args' => args }) end |
.increase_metafield(*args) ⇒ Object
224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/models/customer.rb', line 224 def self.(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'increase_metafield', 'http_method' => 'POST', 'path' => '/v1/customers/{customerId}/meta/{field}/inc', 'params' => ['customerId', 'field', ], 'args' => args }) end |
.is_authenticated(*args) ⇒ Object
237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/models/customer.rb', line 237 def self.is_authenticated(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'is_authenticated', 'http_method' => 'GET', 'path' => '/v1/customers/auth', 'params' => [], 'args' => args }) end |
.list(*args) ⇒ Object
250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/models/customer.rb', line 250 def self.list(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'list', 'http_method' => 'GET', 'path' => '/v1/customers', 'params' => [], 'args' => args }) end |
.list_by_flag_votes(*args) ⇒ Object
263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/models/customer.rb', line 263 def self.list_by_flag_votes(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'list_by_flag_votes', 'http_method' => 'GET', 'path' => '/v1/{voteModel}/{voteModelId}/flags/customers', 'params' => ['voteModel', 'voteModelId', ], 'args' => args }) end |
.list_by_help_votes(*args) ⇒ Object
289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/models/customer.rb', line 289 def self.list_by_help_votes(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'list_by_help_votes', 'http_method' => 'GET', 'path' => '/v1/{voteModel}/{voteModelId}/helped/{upDown}/customers', 'params' => ['voteModel', 'voteModelId', 'upDown', ], 'args' => args }) end |
.list_coupons(*args) ⇒ Object
315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/models/customer.rb', line 315 def self.list_coupons(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'list_coupons', 'http_method' => 'GET', 'path' => '/v1/customers/{customerId}/coupons', 'params' => ['customerId', ], 'args' => args }) end |
.list_coupons_for_me(*args) ⇒ Object
328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/models/customer.rb', line 328 def self.list_coupons_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'list_coupons_for_me', 'http_method' => 'GET', 'path' => '/v1/me/coupons', 'params' => [], 'args' => args }) end |
.name ⇒ Object
8 9 10 |
# File 'lib/models/customer.rb', line 8 def self.name @@name end |
.path ⇒ Object
12 13 14 |
# File 'lib/models/customer.rb', line 12 def self.path @@path end |
.pull_from_metafield(*args) ⇒ Object
341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/models/customer.rb', line 341 def self.(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'pull_from_metafield', 'http_method' => 'POST', 'path' => '/v1/customers/{customerId}/meta/{field}/pull', 'params' => ['customerId', 'field', ], 'args' => args }) end |
.push_to_metafield(*args) ⇒ Object
354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/models/customer.rb', line 354 def self.(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'push_to_metafield', 'http_method' => 'POST', 'path' => '/v1/customers/{customerId}/meta/{field}/push', 'params' => ['customerId', 'field', ], 'args' => args }) end |
.recover_credential(*args) ⇒ Object
367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/models/customer.rb', line 367 def self.recover_credential(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'recover_credential', 'http_method' => 'POST', 'path' => '/v1/customers/credentials/{credentialField}/recoveries/{recoveryMethod}', 'params' => ['credentialField', 'recoveryMethod', ], 'args' => args }) end |
.request_verification(*args) ⇒ Object
380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/models/customer.rb', line 380 def self.request_verification(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'request_verification', 'http_method' => 'POST', 'path' => '/v1/customers/verifications/{channelSlug}', 'params' => ['channelSlug', ], 'args' => args }) end |
.request_verification_email(*args) ⇒ Object
393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/models/customer.rb', line 393 def self.request_verification_email(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'request_verification_email', 'http_method' => 'POST', 'path' => '/v1/customers/verifications/emails', 'params' => [], 'args' => args }) end |
.reset_password(*args) ⇒ Object
406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/models/customer.rb', line 406 def self.reset_password(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'reset_password', 'http_method' => 'PUT', 'path' => '/v1/customers/{customerId}/password', 'params' => ['customerId', ], 'args' => args }) end |
.update(*args) ⇒ Object
419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/models/customer.rb', line 419 def self.update(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'update', 'http_method' => 'PUT', 'path' => '/v1/customers/{customerId}', 'params' => ['customerId', ], 'args' => args }) end |
.update_credentials(*args) ⇒ Object
432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/models/customer.rb', line 432 def self.update_credentials(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'update_credentials', 'http_method' => 'PUT', 'path' => '/v1/customers/{customerId}/credentials', 'params' => ['customerId', ], 'args' => args }) end |
.update_credentials_for_me(*args) ⇒ Object
445 446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/models/customer.rb', line 445 def self.update_credentials_for_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'update_credentials_for_me', 'http_method' => 'PUT', 'path' => '/v1/me/credentials', 'params' => [], 'args' => args }) end |
.update_me(*args) ⇒ Object
458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/models/customer.rb', line 458 def self.update_me(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'update_me', 'http_method' => 'PUT', 'path' => '/v1/me', 'params' => [], 'args' => args }) end |
.verify(*args) ⇒ Object
471 472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/models/customer.rb', line 471 def self.verify(*args) Clayful.call_api({ 'model_name' => @@name, 'method_name' => 'verify', 'http_method' => 'POST', 'path' => '/v1/customers/{customerId}/verified', 'params' => ['customerId', ], 'args' => args }) end |