Class: ShelfWatch::Resources::Mdm
- Inherits:
-
Object
- Object
- ShelfWatch::Resources::Mdm
- Defined in:
- lib/shelfwatch/resources/mdm.rb
Overview
Master data management endpoints.
Instance Method Summary collapse
-
#brands(project_id: nil, limit: 100, offset: 0, mdm_category_id: nil, brand_id: nil, q: nil, include_inactive: false, include_total: true) ⇒ Object
List MDM brands for the project.
-
#categories(project_id: nil, limit: 100, offset: 0, q: nil, include_inactive: false, include_total: true) ⇒ Object
List MDM categories for the project.
-
#initialize(client) ⇒ Mdm
constructor
A new instance of Mdm.
-
#schedules(start_date:, end_date:, project_id: nil, limit: 100, offset: 0, store_code: nil, user_uuid: nil, frequency: nil, include_total: true) ⇒ Object
List schedules (max 31-day range on start_datetime).
-
#skus(project_id: nil, limit: 100, offset: 0, mdm_category_id: nil, brand_id: nil, sku_id: nil, q: nil, include_inactive: false, include_total: true) ⇒ Object
List MDM SKUs for the project.
-
#stores(project_id: nil, limit: 100, offset: 0, store_code: nil, q: nil, include_total: true) ⇒ Object
List stores for the project.
-
#users(project_id: nil, limit: 100, offset: 0, user_uuid: nil, q: nil, include_total: true) ⇒ Object
List users for the project.
Constructor Details
#initialize(client) ⇒ Mdm
Returns a new instance of Mdm.
7 8 9 |
# File 'lib/shelfwatch/resources/mdm.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#brands(project_id: nil, limit: 100, offset: 0, mdm_category_id: nil, brand_id: nil, q: nil, include_inactive: false, include_total: true) ⇒ Object
List MDM brands for the project.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/shelfwatch/resources/mdm.rb', line 81 def brands( project_id: nil, limit: 100, offset: 0, mdm_category_id: nil, brand_id: nil, q: nil, include_inactive: false, include_total: true ) @client.request( "GET", "/v2/mdm/brands", params: Http.drop_none( project_id: @client.project(project_id), limit: limit, offset: offset, mdm_category_id: Http.join_csv(mdm_category_id), brand_id: Http.join_csv(brand_id), q: q, include_inactive: include_inactive, include_total: include_total ) ) end |
#categories(project_id: nil, limit: 100, offset: 0, q: nil, include_inactive: false, include_total: true) ⇒ Object
List MDM categories for the project.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/shelfwatch/resources/mdm.rb', line 58 def categories( project_id: nil, limit: 100, offset: 0, q: nil, include_inactive: false, include_total: true ) @client.request( "GET", "/v2/mdm/categories", params: Http.drop_none( project_id: @client.project(project_id), limit: limit, offset: offset, q: q, include_inactive: include_inactive, include_total: include_total ) ) end |
#schedules(start_date:, end_date:, project_id: nil, limit: 100, offset: 0, store_code: nil, user_uuid: nil, frequency: nil, include_total: true) ⇒ Object
List schedules (max 31-day range on start_datetime).
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/shelfwatch/resources/mdm.rb', line 137 def schedules( start_date:, end_date:, project_id: nil, limit: 100, offset: 0, store_code: nil, user_uuid: nil, frequency: nil, include_total: true ) @client.request( "GET", "/v2/mdm/schedules", params: Http.drop_none( project_id: @client.project(project_id), start_date: Http.format_date(start_date), end_date: Http.format_date(end_date), limit: limit, offset: offset, store_code: Http.join_csv(store_code), user_uuid: Http.join_csv(user_uuid), frequency: frequency, include_total: include_total ) ) end |
#skus(project_id: nil, limit: 100, offset: 0, mdm_category_id: nil, brand_id: nil, sku_id: nil, q: nil, include_inactive: false, include_total: true) ⇒ Object
List MDM SKUs for the project.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/shelfwatch/resources/mdm.rb', line 108 def skus( project_id: nil, limit: 100, offset: 0, mdm_category_id: nil, brand_id: nil, sku_id: nil, q: nil, include_inactive: false, include_total: true ) @client.request( "GET", "/v2/mdm/skus", params: Http.drop_none( project_id: @client.project(project_id), limit: limit, offset: offset, mdm_category_id: Http.join_csv(mdm_category_id), brand_id: Http.join_csv(brand_id), sku_id: Http.join_csv(sku_id), q: q, include_inactive: include_inactive, include_total: include_total ) ) end |
#stores(project_id: nil, limit: 100, offset: 0, store_code: nil, q: nil, include_total: true) ⇒ Object
List stores for the project.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/shelfwatch/resources/mdm.rb', line 12 def stores( project_id: nil, limit: 100, offset: 0, store_code: nil, q: nil, include_total: true ) @client.request( "GET", "/v2/mdm/stores", params: Http.drop_none( project_id: @client.project(project_id), limit: limit, offset: offset, store_code: Http.join_csv(store_code), q: q, include_total: include_total ) ) end |
#users(project_id: nil, limit: 100, offset: 0, user_uuid: nil, q: nil, include_total: true) ⇒ Object
List users for the project.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/shelfwatch/resources/mdm.rb', line 35 def users( project_id: nil, limit: 100, offset: 0, user_uuid: nil, q: nil, include_total: true ) @client.request( "GET", "/v2/mdm/users", params: Http.drop_none( project_id: @client.project(project_id), limit: limit, offset: offset, user_uuid: Http.join_csv(user_uuid), q: q, include_total: include_total ) ) end |