gemgento 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (429) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +8 -0
  5. data/README.md +9 -0
  6. data/Rakefile +21 -0
  7. data/app/adapters/gemgento/magento/address_adapter.rb +37 -0
  8. data/app/adapters/gemgento/magento/customer_adapter.rb +24 -0
  9. data/app/adapters/gemgento/magento/line_item_adapter.rb +41 -0
  10. data/app/adapters/gemgento/magento/order_adapter.rb +97 -0
  11. data/app/adapters/gemgento/magento/order_status_adapter.rb +24 -0
  12. data/app/adapters/gemgento/magento/payment_adapter.rb +38 -0
  13. data/app/adapters/gemgento/magento/product_adapater.rb +24 -0
  14. data/app/adapters/gemgento/magento/quote_adapter.rb +17 -0
  15. data/app/adapters/gemgento/magento/shipment_adapter.rb +74 -0
  16. data/app/adapters/gemgento/magento/shipment_item_adapter.rb +39 -0
  17. data/app/adapters/gemgento/magento/shipment_track_adapter.rb +31 -0
  18. data/app/adapters/gemgento/magento_adapter.rb +17 -0
  19. data/app/assets/fonts/FuturaStd-Bold.otf +0 -0
  20. data/app/assets/fonts/FuturaStd-Book.otf +0 -0
  21. data/app/assets/fonts/FuturaStd-Light.otf +0 -0
  22. data/app/assets/fonts/FuturaStd-Medium.otf +0 -0
  23. data/app/assets/fonts/Verlag-Black.otf +0 -0
  24. data/app/assets/fonts/Verlag-BlackItalic.otf +0 -0
  25. data/app/assets/fonts/Verlag-Bold.otf +0 -0
  26. data/app/assets/fonts/Verlag-BoldItalic.otf +0 -0
  27. data/app/assets/fonts/Verlag-Book.otf +0 -0
  28. data/app/assets/fonts/Verlag-BookItalic-2.otf +0 -0
  29. data/app/assets/fonts/Verlag-BookItalic-3.otf +0 -0
  30. data/app/assets/fonts/Verlag-BookItalic.otf +0 -0
  31. data/app/assets/fonts/Verlag-Light.otf +0 -0
  32. data/app/assets/fonts/Verlag-LightItalic.otf +0 -0
  33. data/app/assets/fonts/Verlag-XLight.otf +0 -0
  34. data/app/assets/fonts/Verlag-XLightItalic.otf +0 -0
  35. data/app/assets/images/about_store.jpg +0 -0
  36. data/app/assets/images/gemgento-icon-bolt.png +0 -0
  37. data/app/assets/javascripts/gemgento/active_admin.js.coffee +42 -0
  38. data/app/assets/javascripts/gemgento/checkout/address.coffee +23 -0
  39. data/app/assets/javascripts/gemgento/gemgento.js +1 -0
  40. data/app/assets/javascripts/gemgento/global.js.coffee +31 -0
  41. data/app/assets/stylesheets/gemgento/active_admin.css.scss +549 -0
  42. data/app/assets/stylesheets/gemgento/default-views/_address.scss +11 -0
  43. data/app/assets/stylesheets/gemgento/default-views/_category.scss +54 -0
  44. data/app/assets/stylesheets/gemgento/default-views/_checkout.scss +28 -0
  45. data/app/assets/stylesheets/gemgento/default-views/_footer.scss +13 -0
  46. data/app/assets/stylesheets/gemgento/default-views/_form.scss +127 -0
  47. data/app/assets/stylesheets/gemgento/default-views/_header.scss +32 -0
  48. data/app/assets/stylesheets/gemgento/default-views/_layout.css.scss +157 -0
  49. data/app/assets/stylesheets/gemgento/default-views/_pages.css.scss +83 -0
  50. data/app/assets/stylesheets/gemgento/default-views/_product.scss +57 -0
  51. data/app/assets/stylesheets/gemgento/default-views/_shopping_bag.scss +87 -0
  52. data/app/assets/stylesheets/gemgento/default-views/_subheader.css.scss +30 -0
  53. data/app/assets/stylesheets/gemgento/default-views/application.css.scss +1 -0
  54. data/app/controllers/concerns/gemgento/api/v1/base.rb +15 -0
  55. data/app/controllers/concerns/gemgento/api/v1/product_filters.rb +33 -0
  56. data/app/controllers/gemgento/addresses_controller.rb +14 -0
  57. data/app/controllers/gemgento/api/v1/categories_controller.rb +13 -0
  58. data/app/controllers/gemgento/api/v1/products_controller.rb +23 -0
  59. data/app/controllers/gemgento/api/v1/search_controller.rb +14 -0
  60. data/app/controllers/gemgento/application_controller.rb +5 -0
  61. data/app/controllers/gemgento/cart_controller.rb +99 -0
  62. data/app/controllers/gemgento/categories_controller.rb +37 -0
  63. data/app/controllers/gemgento/checkout/address_controller.rb +48 -0
  64. data/app/controllers/gemgento/checkout/confirm_controller.rb +72 -0
  65. data/app/controllers/gemgento/checkout/coupons_controller.rb +42 -0
  66. data/app/controllers/gemgento/checkout/gift_card_controller.rb +39 -0
  67. data/app/controllers/gemgento/checkout/gift_controller.rb +32 -0
  68. data/app/controllers/gemgento/checkout/login_controller.rb +123 -0
  69. data/app/controllers/gemgento/checkout/payment_controller.rb +70 -0
  70. data/app/controllers/gemgento/checkout/paypal_controller.rb +23 -0
  71. data/app/controllers/gemgento/checkout/shipping_controller.rb +46 -0
  72. data/app/controllers/gemgento/checkout/shipping_payment_controller.rb +58 -0
  73. data/app/controllers/gemgento/checkout/thank_you_controller.rb +45 -0
  74. data/app/controllers/gemgento/checkout_controller.rb +120 -0
  75. data/app/controllers/gemgento/countries_controller.rb +17 -0
  76. data/app/controllers/gemgento/errors_controller.rb +7 -0
  77. data/app/controllers/gemgento/footer_items_controller.rb +16 -0
  78. data/app/controllers/gemgento/home_controller.rb +7 -0
  79. data/app/controllers/gemgento/magento/addresses_controller.rb +61 -0
  80. data/app/controllers/gemgento/magento/base_controller.rb +18 -0
  81. data/app/controllers/gemgento/magento/categories_controller.rb +103 -0
  82. data/app/controllers/gemgento/magento/email/sales/credit_memos_controller.rb +21 -0
  83. data/app/controllers/gemgento/magento/email/sales/invoices_controller.rb +21 -0
  84. data/app/controllers/gemgento/magento/email/sales/orders_controller.rb +20 -0
  85. data/app/controllers/gemgento/magento/email/sales/shipments_controller.rb +25 -0
  86. data/app/controllers/gemgento/magento/emails_controller.rb +11 -0
  87. data/app/controllers/gemgento/magento/inventory_controller.rb +30 -0
  88. data/app/controllers/gemgento/magento/orders_controller.rb +12 -0
  89. data/app/controllers/gemgento/magento/price_rules_controller.rb +22 -0
  90. data/app/controllers/gemgento/magento/product_attribute_sets_controller.rb +37 -0
  91. data/app/controllers/gemgento/magento/product_attributes_controller.rb +70 -0
  92. data/app/controllers/gemgento/magento/products_controller.rb +240 -0
  93. data/app/controllers/gemgento/magento/recurring_profiles_controller.rb +42 -0
  94. data/app/controllers/gemgento/magento/stores_controller.rb +21 -0
  95. data/app/controllers/gemgento/magento/user_groups_controller.rb +23 -0
  96. data/app/controllers/gemgento/magento/users_controller.rb +63 -0
  97. data/app/controllers/gemgento/order_export_controller.rb +21 -0
  98. data/app/controllers/gemgento/orders_controller.rb +12 -0
  99. data/app/controllers/gemgento/products_controller.rb +12 -0
  100. data/app/controllers/gemgento/regions_controller.rb +18 -0
  101. data/app/controllers/gemgento/search_controller.rb +16 -0
  102. data/app/controllers/gemgento/shipments_controller.rb +5 -0
  103. data/app/controllers/gemgento/stock_notifications_controller.rb +22 -0
  104. data/app/controllers/gemgento/subscribers_controller.rb +35 -0
  105. data/app/controllers/gemgento/sync_controller.rb +50 -0
  106. data/app/controllers/gemgento/user/addresses_controller.rb +79 -0
  107. data/app/controllers/gemgento/user/base_controller.rb +14 -0
  108. data/app/controllers/gemgento/user/home_controller.rb +9 -0
  109. data/app/controllers/gemgento/user/orders_controller.rb +17 -0
  110. data/app/controllers/gemgento/user/passwords_controller.rb +18 -0
  111. data/app/controllers/gemgento/user/recurring_profiles_controller.rb +31 -0
  112. data/app/controllers/gemgento/user/registration_session_controller.rb +103 -0
  113. data/app/controllers/gemgento/user/registrations_controller.rb +28 -0
  114. data/app/controllers/gemgento/user/saved_credit_cards_controller.rb +56 -0
  115. data/app/controllers/gemgento/user/sessions_controller.rb +50 -0
  116. data/app/controllers/gemgento/user/wishlist_items_controller.rb +55 -0
  117. data/app/controllers/gemgento/users_controller.rb +36 -0
  118. data/app/helpers/gemgento/application_helper.rb +125 -0
  119. data/app/helpers/gemgento/categories_helper.rb +39 -0
  120. data/app/helpers/gemgento/checkout/payment_helper.rb +5 -0
  121. data/app/helpers/gemgento/products_helper.rb +23 -0
  122. data/app/jobs/gemgento/import_job.rb +12 -0
  123. data/app/mailers/gemgento/sales_mailer.rb +80 -0
  124. data/app/models/admin_user.rb +7 -0
  125. data/app/models/concerns/gemgento/product_touches.rb +26 -0
  126. data/app/models/gemgento.rb +5 -0
  127. data/app/models/gemgento/adapter/sellect/customer.rb +34 -0
  128. data/app/models/gemgento/adapter/sellect/order.rb +378 -0
  129. data/app/models/gemgento/adapter/sellect/product.rb +250 -0
  130. data/app/models/gemgento/adapter/sellect_adapter.rb +16 -0
  131. data/app/models/gemgento/adapter/shopify/address.rb +40 -0
  132. data/app/models/gemgento/adapter/shopify/category.rb +51 -0
  133. data/app/models/gemgento/adapter/shopify/customer.rb +66 -0
  134. data/app/models/gemgento/adapter/shopify/order.rb +334 -0
  135. data/app/models/gemgento/adapter/shopify/product.rb +377 -0
  136. data/app/models/gemgento/adapter/shopify/product_category_position.rb +58 -0
  137. data/app/models/gemgento/adapter/shopify_adapter.rb +63 -0
  138. data/app/models/gemgento/address.rb +206 -0
  139. data/app/models/gemgento/api_job.rb +68 -0
  140. data/app/models/gemgento/asset.rb +185 -0
  141. data/app/models/gemgento/asset_file.rb +57 -0
  142. data/app/models/gemgento/asset_type.rb +8 -0
  143. data/app/models/gemgento/bundle.rb +5 -0
  144. data/app/models/gemgento/bundle/item.rb +17 -0
  145. data/app/models/gemgento/bundle/option.rb +20 -0
  146. data/app/models/gemgento/category.rb +235 -0
  147. data/app/models/gemgento/country.rb +21 -0
  148. data/app/models/gemgento/gift_message.rb +8 -0
  149. data/app/models/gemgento/image_import.rb +141 -0
  150. data/app/models/gemgento/import.rb +125 -0
  151. data/app/models/gemgento/inventory.rb +60 -0
  152. data/app/models/gemgento/inventory_import.rb +51 -0
  153. data/app/models/gemgento/line_item.rb +142 -0
  154. data/app/models/gemgento/line_item_option.rb +10 -0
  155. data/app/models/gemgento/magento_db.rb +35 -0
  156. data/app/models/gemgento/magento_response.rb +10 -0
  157. data/app/models/gemgento/order.rb +56 -0
  158. data/app/models/gemgento/order_status.rb +7 -0
  159. data/app/models/gemgento/payment.rb +50 -0
  160. data/app/models/gemgento/price_rule.rb +258 -0
  161. data/app/models/gemgento/price_tier.rb +36 -0
  162. data/app/models/gemgento/product.rb +607 -0
  163. data/app/models/gemgento/product_attribute.rb +48 -0
  164. data/app/models/gemgento/product_attribute_option.rb +39 -0
  165. data/app/models/gemgento/product_attribute_set.rb +22 -0
  166. data/app/models/gemgento/product_attribute_value.rb +26 -0
  167. data/app/models/gemgento/product_category.rb +34 -0
  168. data/app/models/gemgento/product_import.rb +359 -0
  169. data/app/models/gemgento/quote.rb +586 -0
  170. data/app/models/gemgento/recurring_profile.rb +28 -0
  171. data/app/models/gemgento/region.rb +14 -0
  172. data/app/models/gemgento/relation.rb +10 -0
  173. data/app/models/gemgento/relation_type.rb +7 -0
  174. data/app/models/gemgento/saved_credit_card.rb +45 -0
  175. data/app/models/gemgento/search.rb +14 -0
  176. data/app/models/gemgento/session.rb +49 -0
  177. data/app/models/gemgento/shipment.rb +38 -0
  178. data/app/models/gemgento/shipment_comment.rb +19 -0
  179. data/app/models/gemgento/shipment_item.rb +11 -0
  180. data/app/models/gemgento/shipment_track.rb +21 -0
  181. data/app/models/gemgento/stock_notification.rb +17 -0
  182. data/app/models/gemgento/store.rb +31 -0
  183. data/app/models/gemgento/store_tag.rb +8 -0
  184. data/app/models/gemgento/subscriber.rb +30 -0
  185. data/app/models/gemgento/swatch.rb +9 -0
  186. data/app/models/gemgento/sync.rb +134 -0
  187. data/app/models/gemgento/tag.rb +64 -0
  188. data/app/models/gemgento/user.rb +161 -0
  189. data/app/models/gemgento/user_group.rb +13 -0
  190. data/app/models/gemgento/wishlist_item.rb +11 -0
  191. data/app/services/gemgento/magento_api.rb +173 -0
  192. data/app/services/gemgento/price.rb +67 -0
  193. data/app/validators/gemgento/credit_card_validator.rb +50 -0
  194. data/app/validators/gemgento/image_import_validator.rb +100 -0
  195. data/app/validators/gemgento/inventory_import_validator.rb +73 -0
  196. data/app/validators/gemgento/inventory_validator.rb +14 -0
  197. data/app/validators/gemgento/product_import_validator.rb +163 -0
  198. data/app/views/admin/product_positions/_index.html.haml +14 -0
  199. data/app/views/devise/registrations/edit.haml +37 -0
  200. data/app/views/gemgento/addresses/_address.json.jbuilder +6 -0
  201. data/app/views/gemgento/addresses/region_options.html.haml +1 -0
  202. data/app/views/gemgento/api/v1/categories/_category.json.jbuilder +52 -0
  203. data/app/views/gemgento/api/v1/categories/index.json.jbuilder +8 -0
  204. data/app/views/gemgento/api/v1/categories/show.json.jbuilder +7 -0
  205. data/app/views/gemgento/api/v1/products/_attributes.json.jbuilder +9 -0
  206. data/app/views/gemgento/api/v1/products/_product.json.jbuilder +18 -0
  207. data/app/views/gemgento/api/v1/products/_relationships.json.jbuilder +48 -0
  208. data/app/views/gemgento/api/v1/products/index.json.jbuilder +8 -0
  209. data/app/views/gemgento/api/v1/products/show.json.jbuilder +7 -0
  210. data/app/views/gemgento/api/v1/search/index.json.jbuilder +8 -0
  211. data/app/views/gemgento/api/v1/search/show.json.jbuilder +8 -0
  212. data/app/views/gemgento/assets/_asset.json.jbuilder +13 -0
  213. data/app/views/gemgento/cart/show.html.haml +67 -0
  214. data/app/views/gemgento/categories/_category.json.jbuilder +9 -0
  215. data/app/views/gemgento/categories/_product_tile.html.haml +16 -0
  216. data/app/views/gemgento/categories/index.html.haml +10 -0
  217. data/app/views/gemgento/categories/index.json.jbuilder +1 -0
  218. data/app/views/gemgento/categories/show.html.haml +16 -0
  219. data/app/views/gemgento/categories/show.json.jbuilder +1 -0
  220. data/app/views/gemgento/checkout/_checkout_header.html.haml +17 -0
  221. data/app/views/gemgento/checkout/address/error.js.erb +1 -0
  222. data/app/views/gemgento/checkout/address/show.html.haml +88 -0
  223. data/app/views/gemgento/checkout/address/success.js.erb +1 -0
  224. data/app/views/gemgento/checkout/confirm/error.js.erb +0 -0
  225. data/app/views/gemgento/checkout/confirm/show.html.haml +60 -0
  226. data/app/views/gemgento/checkout/confirm/success.js.erb +1 -0
  227. data/app/views/gemgento/checkout/login/login_fail.js.erb +1 -0
  228. data/app/views/gemgento/checkout/login/login_guest_fail.js.erb +1 -0
  229. data/app/views/gemgento/checkout/login/login_guest_success.js.erb +1 -0
  230. data/app/views/gemgento/checkout/login/login_success.js.erb +1 -0
  231. data/app/views/gemgento/checkout/login/registration_fail.js.erb +1 -0
  232. data/app/views/gemgento/checkout/login/registration_success.js.erb +1 -0
  233. data/app/views/gemgento/checkout/login/show.html.haml +50 -0
  234. data/app/views/gemgento/checkout/payment/error.js.erb +1 -0
  235. data/app/views/gemgento/checkout/payment/show.html.haml +56 -0
  236. data/app/views/gemgento/checkout/payment/success.js.erb +1 -0
  237. data/app/views/gemgento/checkout/shipping/error.js.erb +0 -0
  238. data/app/views/gemgento/checkout/shipping/show.html.haml +26 -0
  239. data/app/views/gemgento/checkout/shipping/success.js.erb +1 -0
  240. data/app/views/gemgento/checkout/shipping_payment/show.haml +52 -0
  241. data/app/views/gemgento/checkout/thank_you/show.html.haml +6 -0
  242. data/app/views/gemgento/countries/_country.json.jbuilder +4 -0
  243. data/app/views/gemgento/countries/index.json.jbuilder +3 -0
  244. data/app/views/gemgento/countries/show.json.jbuilder +1 -0
  245. data/app/views/gemgento/home/index.html.haml +1 -0
  246. data/app/views/gemgento/order/add_item.js.erb +0 -0
  247. data/app/views/gemgento/order/no_inventory.js.erb +1 -0
  248. data/app/views/gemgento/order/remove_item.js.erb +0 -0
  249. data/app/views/gemgento/order/update_item.js.erb +0 -0
  250. data/app/views/gemgento/order_export/index.html.haml +2 -0
  251. data/app/views/gemgento/order_items/_order_item.json.jbuilder +7 -0
  252. data/app/views/gemgento/orders/_order.json.jbuilder +29 -0
  253. data/app/views/gemgento/products/_product.json.jbuilder +40 -0
  254. data/app/views/gemgento/products/index.html.haml +19 -0
  255. data/app/views/gemgento/products/show.html.haml +67 -0
  256. data/app/views/gemgento/products/show.json.jbuilder +1 -0
  257. data/app/views/gemgento/sales_mailer/credit_memo_email.html.haml +1 -0
  258. data/app/views/gemgento/sales_mailer/invoice_email.html.haml +1 -0
  259. data/app/views/gemgento/sales_mailer/order_email.html.haml +1 -0
  260. data/app/views/gemgento/sales_mailer/shipment_email.html.haml +1 -0
  261. data/app/views/gemgento/search/index.html.haml +8 -0
  262. data/app/views/gemgento/shared/_asset.json.jbuilder +35 -0
  263. data/app/views/gemgento/shared/_asset_file.json.jbuilder +19 -0
  264. data/app/views/gemgento/shared/_asset_type.json.jbuilder +13 -0
  265. data/app/views/gemgento/shared/_error_messages.haml +7 -0
  266. data/app/views/gemgento/shared/_flash_messages.haml +4 -0
  267. data/app/views/gemgento/shared/_footer.haml +7 -0
  268. data/app/views/gemgento/shared/_header.haml +23 -0
  269. data/app/views/gemgento/shared/_mini_bag.haml +36 -0
  270. data/app/views/gemgento/shared/_product_image.haml +8 -0
  271. data/app/views/gemgento/shipments/_shipment.json.jbuilder +12 -0
  272. data/app/views/gemgento/subscribers/create.js.erb +2 -0
  273. data/app/views/gemgento/subscribers/errors.js.erb +1 -0
  274. data/app/views/gemgento/user/_user.json.jbuilder +2 -0
  275. data/app/views/gemgento/user/addresses/_form.haml +39 -0
  276. data/app/views/gemgento/user/addresses/errors.js.erb +1 -0
  277. data/app/views/gemgento/user/addresses/index.haml +33 -0
  278. data/app/views/gemgento/user/addresses/new.haml +11 -0
  279. data/app/views/gemgento/user/addresses/success.js.erb +1 -0
  280. data/app/views/gemgento/user/confirmations/new.haml +9 -0
  281. data/app/views/gemgento/user/home/index.haml +8 -0
  282. data/app/views/gemgento/user/mailer/confirmation_instructions.html.erb +5 -0
  283. data/app/views/gemgento/user/mailer/reset_password_instructions.html.erb +8 -0
  284. data/app/views/gemgento/user/mailer/unlock_instructions.html.erb +7 -0
  285. data/app/views/gemgento/user/orders/index.html.haml +29 -0
  286. data/app/views/gemgento/user/orders/show.html.haml +87 -0
  287. data/app/views/gemgento/user/passwords/edit.html.erb +18 -0
  288. data/app/views/gemgento/user/passwords/new.html.haml +21 -0
  289. data/app/views/gemgento/user/registration_session/new.haml +67 -0
  290. data/app/views/gemgento/user/registrations/new.html.haml +28 -0
  291. data/app/views/gemgento/user/saved_credit_cards/_form.haml +69 -0
  292. data/app/views/gemgento/user/saved_credit_cards/index.haml +25 -0
  293. data/app/views/gemgento/user/saved_credit_cards/new.haml +13 -0
  294. data/app/views/gemgento/user/sessions/new.html.haml +29 -0
  295. data/app/views/gemgento/user/shared/_links.erb +25 -0
  296. data/app/views/gemgento/user/shared/_user_header.haml +8 -0
  297. data/app/views/gemgento/user/wishlist_items/index.html.haml +20 -0
  298. data/app/views/kaminari/_first_page.html.haml +9 -0
  299. data/app/views/kaminari/_gap.html.haml +8 -0
  300. data/app/views/kaminari/_last_page.html.haml +9 -0
  301. data/app/views/kaminari/_next_page.html.haml +9 -0
  302. data/app/views/kaminari/_page.html.haml +10 -0
  303. data/app/views/kaminari/_paginator.html.haml +18 -0
  304. data/app/views/kaminari/_prev_page.html.haml +9 -0
  305. data/app/views/layouts/_footer.html.haml +5 -0
  306. data/app/views/layouts/_header.html.haml +39 -0
  307. data/app/views/layouts/gemgento.html.haml +22 -0
  308. data/app/workers/gemgento/apply_price_rule.rb +24 -0
  309. data/app/workers/gemgento/cart/add_item_worker.rb +23 -0
  310. data/app/workers/gemgento/cart/update_item_worker.rb +18 -0
  311. data/bin/rails +12 -0
  312. data/config/gemgento_config.yml +12 -0
  313. data/config/initializers/active_admin.rb +14 -0
  314. data/config/initializers/active_touch.rb +3 -0
  315. data/config/initializers/assets.rb +1 -0
  316. data/config/initializers/boolean_typecasting.rb +37 -0
  317. data/config/initializers/devise.rb +49 -0
  318. data/config/initializers/gemgento_config.rb +67 -0
  319. data/config/initializers/mime_types.rb +4 -0
  320. data/config/initializers/state_machine.rb +7 -0
  321. data/config/locales/en.yml +24 -0
  322. data/config/routes.rb +138 -0
  323. data/db/migrate/20151201231300_add_validation_indexes_to_gemgento_products.rb +22 -0
  324. data/db/migrate/20160122174450_gemgento2.rb +969 -0
  325. data/db/migrate/20160217142910_create_gemgento_imports.rb +15 -0
  326. data/db/migrate/20160219235858_add_timestamps_to_gemgento_asset_files.rb +6 -0
  327. data/gemgento.gemspec +44 -0
  328. data/lib/devise/models/validatable.rb +76 -0
  329. data/lib/gemgento.rb +24 -0
  330. data/lib/gemgento/admin/admin_user.rb +29 -0
  331. data/lib/gemgento/admin/api_jobs.rb +30 -0
  332. data/lib/gemgento/admin/image_import.rb +87 -0
  333. data/lib/gemgento/admin/inventory_import.rb +81 -0
  334. data/lib/gemgento/admin/product_import.rb +138 -0
  335. data/lib/gemgento/admin/product_positions.rb +49 -0
  336. data/lib/gemgento/admin/stores.rb +33 -0
  337. data/lib/gemgento/admin/subscribers.rb +31 -0
  338. data/lib/gemgento/admin/syncs.rb +26 -0
  339. data/lib/gemgento/api/soap/authnetcim/payment.rb +127 -0
  340. data/lib/gemgento/api/soap/catalog/category.rb +237 -0
  341. data/lib/gemgento/api/soap/catalog/product.rb +481 -0
  342. data/lib/gemgento/api/soap/catalog/product_attribute.rb +147 -0
  343. data/lib/gemgento/api/soap/catalog/product_attribute_media.rb +202 -0
  344. data/lib/gemgento/api/soap/catalog/product_attribute_set.rb +80 -0
  345. data/lib/gemgento/api/soap/catalog/product_tag.rb +146 -0
  346. data/lib/gemgento/api/soap/catalog/product_tier_price.rb +21 -0
  347. data/lib/gemgento/api/soap/catalog/search.rb +27 -0
  348. data/lib/gemgento/api/soap/catalog_inventory/stock_item.rb +87 -0
  349. data/lib/gemgento/api/soap/catalog_rule/rule.rb +54 -0
  350. data/lib/gemgento/api/soap/checkout/cart.rb +85 -0
  351. data/lib/gemgento/api/soap/checkout/coupon.rb +37 -0
  352. data/lib/gemgento/api/soap/checkout/customer.rb +87 -0
  353. data/lib/gemgento/api/soap/checkout/payment.rb +59 -0
  354. data/lib/gemgento/api/soap/checkout/product.rb +138 -0
  355. data/lib/gemgento/api/soap/checkout/shipping.rb +37 -0
  356. data/lib/gemgento/api/soap/customer/address.rb +143 -0
  357. data/lib/gemgento/api/soap/customer/customer.rb +200 -0
  358. data/lib/gemgento/api/soap/directory/country.rb +49 -0
  359. data/lib/gemgento/api/soap/directory/region.rb +50 -0
  360. data/lib/gemgento/api/soap/enterprise_gift_message/gift_message.rb +26 -0
  361. data/lib/gemgento/api/soap/gift_card.rb +35 -0
  362. data/lib/gemgento/api/soap/globalcollect/saved_cc.rb +58 -0
  363. data/lib/gemgento/api/soap/miscellaneous/store.rb +47 -0
  364. data/lib/gemgento/api/soap/sales/order.rb +249 -0
  365. data/lib/gemgento/api/soap/sales/order_shipment.rb +122 -0
  366. data/lib/gemgento/api/soap/sales/recurring_profile.rb +88 -0
  367. data/lib/gemgento/api/soap/stock_notification.rb +27 -0
  368. data/lib/gemgento/engine.rb +61 -0
  369. data/lib/gemgento/version.rb +3 -0
  370. data/lib/generators/gemgento/assets_generator.rb +11 -0
  371. data/lib/generators/gemgento/install_generator.rb +34 -0
  372. data/lib/generators/gemgento/templates/active_admin.css.scss +1 -0
  373. data/lib/generators/gemgento/templates/active_admin.js.coffee +1 -0
  374. data/lib/generators/gemgento/templates/active_admin.rb +3 -0
  375. data/lib/generators/gemgento/views_generator.rb +10 -0
  376. data/spec/dummy/README.rdoc +28 -0
  377. data/spec/dummy/Rakefile +6 -0
  378. data/spec/dummy/app/assets/images/.keep +0 -0
  379. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  380. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  381. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  382. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  383. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  384. data/spec/dummy/app/mailers/.keep +0 -0
  385. data/spec/dummy/app/models/.keep +0 -0
  386. data/spec/dummy/app/models/concerns/.keep +0 -0
  387. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  388. data/spec/dummy/bin/bundle +3 -0
  389. data/spec/dummy/bin/rails +4 -0
  390. data/spec/dummy/bin/rake +4 -0
  391. data/spec/dummy/bin/setup +29 -0
  392. data/spec/dummy/config.ru +4 -0
  393. data/spec/dummy/config/application.rb +32 -0
  394. data/spec/dummy/config/boot.rb +5 -0
  395. data/spec/dummy/config/database.yml +20 -0
  396. data/spec/dummy/config/environment.rb +5 -0
  397. data/spec/dummy/config/environments/development.rb +41 -0
  398. data/spec/dummy/config/environments/production.rb +79 -0
  399. data/spec/dummy/config/environments/test.rb +42 -0
  400. data/spec/dummy/config/gemgento_config.yml +22 -0
  401. data/spec/dummy/config/initializers/assets.rb +11 -0
  402. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  403. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  404. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  405. data/spec/dummy/config/initializers/inflections.rb +16 -0
  406. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  407. data/spec/dummy/config/initializers/session_store.rb +3 -0
  408. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  409. data/spec/dummy/config/locales/en.yml +23 -0
  410. data/spec/dummy/config/routes.rb +4 -0
  411. data/spec/dummy/config/secrets.yml +22 -0
  412. data/spec/dummy/lib/assets/.keep +0 -0
  413. data/spec/dummy/public/404.html +67 -0
  414. data/spec/dummy/public/422.html +67 -0
  415. data/spec/dummy/public/500.html +66 -0
  416. data/spec/dummy/public/favicon.ico +0 -0
  417. data/spec/factories/gemgento/price_tiers.rb +8 -0
  418. data/spec/factories/gemgento/product_attribute_sets.rb +22 -0
  419. data/spec/factories/gemgento/product_attributes.rb +5 -0
  420. data/spec/factories/gemgento/products.rb +14 -0
  421. data/spec/factories/gemgento/stores.rb +12 -0
  422. data/spec/factories/gemgento/user_groups.rb +6 -0
  423. data/spec/factories/gemgento/users.rb +13 -0
  424. data/spec/factories/gemgento_imports.rb +12 -0
  425. data/spec/model/gemgento/price_tier_spec.rb +45 -0
  426. data/spec/rails_helper.rb +55 -0
  427. data/spec/services/gemgento/price_spec.rb +152 -0
  428. data/spec/spec_helper.rb +87 -0
  429. metadata +919 -0
@@ -0,0 +1,49 @@
1
+ module Gemgento
2
+ module API
3
+ module SOAP
4
+ module Directory
5
+ class Country
6
+
7
+ # Fetch all Countries from Magento and sync them to Gemgento.
8
+ #
9
+ # @return [Void]
10
+ def self.fetch_all
11
+ response = list
12
+
13
+ if response.success?
14
+ response.body[:countries][:item].each do |country|
15
+ sync_magento_to_local(country)
16
+ end
17
+ end
18
+ end
19
+
20
+ # Get a list of Countries from Magento.
21
+ #
22
+ # @return [Gemgento::MagentoResponse]
23
+ def self.list
24
+ response = MagentoApi.create_call(:directory_country_list)
25
+
26
+ if response.success? && !response.body[:countries][:item].is_a?(Array)
27
+ response.body[:countries][:item] = [response.body[:countries][:item]]
28
+ end
29
+
30
+ return response
31
+ end
32
+
33
+ private
34
+
35
+ # Save Magento product attribute set to local
36
+ def self.sync_magento_to_local(source)
37
+ country = Gemgento::Country.where(magento_id: source[:country_id]).first_or_initialize
38
+ country.magento_id = source[:country_id]
39
+ country.iso2_code = source[:iso2_code]
40
+ country.iso3_code = source[:iso3_code]
41
+ country.name = source[:name]
42
+ country.save
43
+ end
44
+
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,50 @@
1
+ module Gemgento
2
+ module API
3
+ module SOAP
4
+ module Directory
5
+ class Region
6
+
7
+ def self.fetch_all
8
+ ::Gemgento::Country.all.each do |country|
9
+ response = list(country.iso2_code)
10
+
11
+ if response.success?
12
+ response.body[:countries][:item].each do |region|
13
+ sync_magento_to_local(region, country)
14
+ end
15
+ end
16
+
17
+ end
18
+ end
19
+
20
+ def self.list(country)
21
+ response = MagentoApi.create_call(:directory_region_list, {country: country})
22
+
23
+ if response.success?
24
+ if response.body[:countries][:item].nil?
25
+ response.body[:countries][:item] = []
26
+ elsif !response.body[:countries][:item].is_a? Array
27
+ response.body[:countries][:item] = [response.body[:countries][:item]]
28
+ end
29
+ end
30
+
31
+ return response
32
+ end
33
+
34
+ private
35
+
36
+ # Save Magento product attribute set to local
37
+ def self.sync_magento_to_local(source, country)
38
+ region = Gemgento::Region.where(magento_id: source[:region_id]).first_or_initialize
39
+ region.magento_id = source[:region_id]
40
+ region.code = source[:code]
41
+ region.name = source[:name]
42
+ region.country = country
43
+ region.save
44
+ end
45
+
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,26 @@
1
+ module Gemgento
2
+ module API
3
+ module SOAP
4
+ module EnterpriseGiftMessage
5
+ class GiftMessage
6
+
7
+ def self.set_for_quote
8
+ # TODO: Create hold API call
9
+ end
10
+
11
+ def self.set_for_quote_item
12
+ # TODO: Create unhold API call
13
+ end
14
+
15
+ def self.set_for_quote_product
16
+ # TODO: Create cancel API call
17
+ end
18
+
19
+ def self.sync_magento_to_local(source)
20
+ # TODO: save gift messages locally
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,35 @@
1
+ module Gemgento
2
+ module API
3
+ module SOAP
4
+ class GiftCard
5
+
6
+ def self.check(code)
7
+ MagentoApi.create_call(:giftcard_check, code: code)
8
+ end
9
+
10
+ def self.history(code)
11
+ MagentoApi.create_call(:giftcard_history, code: code)
12
+ end
13
+
14
+ def self.create(data)
15
+ MagentoApi.create_call(:giftcard_create, data: data)
16
+ end
17
+
18
+ def self.update(code, data)
19
+ MagentoApi.create_call(:giftcard_update, code: code, data: data)
20
+ end
21
+
22
+ def self.quote_add(quote_id, code, store_id)
23
+ message = { quote_id: quote_id, code: code, store_id: store_id }
24
+ MagentoApi.create_call(:giftcard_quote_add, message)
25
+ end
26
+
27
+ def self.quote_remove(quote_id, code, store_id)
28
+ message = { quote_id: quote_id, code: code }
29
+ MagentoApi.create_call(:giftcard_quote_remove, message)
30
+ end
31
+
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,58 @@
1
+ module Gemgento
2
+ module API
3
+ module SOAP
4
+ module Globalcollect
5
+ class SavedCc
6
+
7
+ def self.fetch_all
8
+ User.all.each do |user|
9
+ fetch(user)
10
+ end
11
+ end
12
+
13
+ def self.fetch(user)
14
+ saved_cards = []
15
+
16
+ tokens(user.magento_id).each do |token|
17
+ saved_cards << sync_magento_to_local(token, user.id)
18
+ end
19
+
20
+ # destroy saved cards that were not returned
21
+ SavedCreditCard.where(user: user).where('id NOT IN (?)', saved_cards.collect(&:id)).delete_all
22
+ end
23
+
24
+ def self.tokens(customer_id)
25
+ response = MagentoApi.create_call(:globalcollect_tokens, {customer_id: customer_id})
26
+
27
+ if response.success?
28
+ if response.body[:result][:item].nil?
29
+ return []
30
+ else
31
+ response.body[:result][:item] = [response.body[:result][:item]] unless response.body[:result][:item].is_a? Array
32
+ return response.body[:result][:item]
33
+ end
34
+ else
35
+ return false
36
+ end
37
+ end
38
+
39
+ private
40
+
41
+ def self.sync_magento_to_local(token, user_id)
42
+ saved_cc = SavedCreditCard.find_or_initialize_by(magento_id: token[:token_id])
43
+ saved_cc.user_id = user_id
44
+ saved_cc.token = token[:token]
45
+ saved_cc.cc_number = token[:cc_number]
46
+ saved_cc.exp_month = token[:expire_date][0..1]
47
+ saved_cc.exp_year = token[:expire_date][2..3]
48
+ saved_cc.cc_type = token[:payment_product_id]
49
+ saved_cc.save
50
+
51
+ return saved_cc
52
+ end
53
+
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,47 @@
1
+ module Gemgento
2
+ module API
3
+ module SOAP
4
+ module Miscellaneous
5
+ class Store
6
+
7
+ def self.fetch_all
8
+ response = list
9
+
10
+ if response.success?
11
+ response.body[:stores][:item].each do |store|
12
+ sync_magento_to_local(store)
13
+ end
14
+ end
15
+
16
+ end
17
+
18
+ def self.list
19
+ response = MagentoApi.create_call(:store_list)
20
+
21
+ if response.success? && !response.body[:stores][:item].is_a?(Array)
22
+ response.body[:stores][:item] = [response.body[:stores][:item]]
23
+ end
24
+
25
+ return response
26
+ end
27
+
28
+ private
29
+
30
+ # Save Magento product attribute set to local
31
+ def self.sync_magento_to_local(source)
32
+ store = Gemgento::Store.where(magento_id: source[:store_id]).first_or_initialize
33
+ store.magento_id = source[:store_id]
34
+ store.code = source[:code]
35
+ store.website_id = source[:website_id]
36
+ store.group_id = source[:group_id]
37
+ store.name = source[:name]
38
+ store.sort_order = source[:sort_order]
39
+ store.is_active = source[:is_active]
40
+ store.save
41
+ end
42
+
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,249 @@
1
+ module Gemgento
2
+ module API
3
+ module SOAP
4
+ module Sales
5
+ class Order
6
+
7
+ def self.fetch_all(last_updated = nil)
8
+ response = list(last_updated)
9
+
10
+ if response.success?
11
+ response.body_overflow[:result][:item].each do |order|
12
+ unless order.nil?
13
+ fetch(order[:increment_id])
14
+ end
15
+ end
16
+ end
17
+
18
+ end
19
+
20
+ # Fetch a Magento Order.
21
+ #
22
+ # @param increment_id [String] Order increment id.
23
+ # @return [Gemgento::Order]
24
+ def self.fetch(increment_id)
25
+ response = info(increment_id)
26
+
27
+ if response.success?
28
+ sync_magento_to_local(response.body[:result])
29
+ else
30
+ return nil
31
+ end
32
+ end
33
+
34
+ # Get a list of orders from Magento.
35
+ #
36
+ # @param last_updated [String] db formatted datetime string.
37
+ # @return [Gemgento::MagentoResponse]
38
+ def self.list(last_updated = nil)
39
+ if last_updated.nil?
40
+ message = {}
41
+ else
42
+ message = {
43
+ 'filters' => {
44
+ 'complex_filter' => {item: [
45
+ key: 'updated_at',
46
+ value: {
47
+ key: 'gt',
48
+ value: last_updated
49
+ }
50
+ ]}
51
+ }
52
+ }
53
+ end
54
+
55
+ response = ::Gemgento::MagentoApi.create_call(:sales_order_list, message)
56
+
57
+ if response.success? && !response.body_overflow[:result][:item].is_a?(Array)
58
+ response.body_overflow[:result][:item] = [response.body_overflow[:result][:item]]
59
+ end
60
+
61
+ return response
62
+ end
63
+
64
+ # Get Order info from Magento.
65
+ #
66
+ # @param increment_id [String]
67
+ # @return [Gemgento::MagentoResponse]
68
+ def self.info(increment_id)
69
+ ::Gemgento::MagentoApi.create_call(:sales_order_info, { order_increment_id: increment_id })
70
+ end
71
+
72
+ def self.hold
73
+ # TODO: Create hold API call
74
+ end
75
+
76
+ def self.unhold
77
+ # TODO: Create unhold API call
78
+ end
79
+
80
+ def self.cancel
81
+ # TODO: Create cancel API call
82
+ end
83
+
84
+ def self.add_comment(increment_id, status, comment = '', notify = nil)
85
+ message = {
86
+ order_increment_id: increment_id,
87
+ status: status,
88
+ comment: comment,
89
+ notify: notify
90
+ }
91
+ MagentoApi.create_call(:sales_order_add_comment, message)
92
+ end
93
+
94
+ private
95
+
96
+ # Save Magento order to local
97
+ #
98
+ # @return [::Gemgento::Order]
99
+ def self.sync_magento_to_local(source)
100
+ return nil if ::Gemgento::Store.find_by(magento_id: source[:store_id]).nil?
101
+
102
+ retry_count ||= 0
103
+
104
+ order = ::Gemgento::Order.find_or_initialize_by(increment_id: source[:increment_id])
105
+ order.magento_id = source[:order_id]
106
+ order.user = ::Gemgento::User.find_by(magento_id: source[:customer_id])
107
+ order.quote = ::Gemgento::Quote.find_by(magento_id: source[:quote_id])
108
+ order.user_group = ::Gemgento::UserGroup.where(magento_id: source[:customer_group_id]).first
109
+ order.store = ::Gemgento::Store.find_by(magento_id: source[:store_id])
110
+
111
+ source.each do |k, v|
112
+ next if [:store_id, :quote_id].include?(k) || !Gemgento::Order.column_names.include?(k.to_s)
113
+ order.assign_attributes k => v
114
+ end
115
+
116
+ order.save! validate: false
117
+
118
+ sync_magento_address_to_local(source[:shipping_address], order, order.shipping_address) unless source[:shipping_address][:address_id].nil?
119
+ sync_magento_address_to_local(source[:billing_address], order, order.billing_address) unless source[:billing_address][:address_id].nil?
120
+
121
+ sync_magento_payment_to_local(source[:payment], order)
122
+
123
+ unless source[:gift_message_id].nil?
124
+ gift_message = ::Gemgento::API::SOAP::EnterpriseGiftMessage::GiftMessage.sync_magento_to_local(source[:gift_message])
125
+ order.gift_message = gift_message
126
+ order.save! validate: false
127
+ end
128
+
129
+ # import line items
130
+ unless source[:items][:item].nil?
131
+ source[:items][:item] = [source[:items][:item]] unless source[:items][:item].is_a? Array
132
+ source[:items][:item].each do |item|
133
+ sync_magento_line_item_to_local(item, order)
134
+ end
135
+ end
136
+
137
+ # remove unused line items
138
+ known_ids = source[:items][:item].map { |i| i[:item_id] }
139
+ Gemgento::LineItem.where(itemizable: order).where.not(magento_id: known_ids).destroy_all
140
+
141
+ if !source[:status_history][:item].nil?
142
+ source[:status_history][:item] = [source[:status_history][:item]] unless source[:status_history][:item].is_a? Array
143
+
144
+ source[:status_history][:item].each do |status|
145
+ sync_magento_order_status_to_local(status, order)
146
+ end
147
+ end
148
+
149
+ order.reload
150
+ return order
151
+
152
+ # try one more time to create the record, duplicate record errors are common with threads
153
+ rescue ActiveRecord::RecordInvalid => e
154
+ (retry_count += 1) <= 1 ? retry : raise(e)
155
+
156
+ rescue ActiveRecord::RecordNotUnique => e
157
+ (retry_count += 1) <= 1 ? retry : raise(e)
158
+ end
159
+
160
+ def self.sync_magento_address_to_local(source, order, address = nil)
161
+ address = ::Gemgento::Address.new if address.nil?
162
+ address.addressable = order
163
+ address.increment_id = source[:increment_id]
164
+ address.city = source[:city]
165
+ address.company = source[:company]
166
+ address.country = ::Gemgento::Country.where(magento_id: source[:country_id]).first
167
+ address.fax = source[:fax]
168
+ address.first_name = source[:firstname]
169
+ address.middle_name = source[:middlename]
170
+ address.last_name = source[:lastname]
171
+ address.postcode = source[:postcode]
172
+ address.prefix = source[:prefix]
173
+ address.region_name = source[:region]
174
+ address.region = ::Gemgento::Region.where(magento_id: source[:region_id]).first
175
+ address.street = source[:street]
176
+ address.suffix = source[:suffix]
177
+ address.telephone = source[:telephone]
178
+ address.is_billing = (source[:address_type] == 'billing')
179
+ address.is_shipping = (source[:address_type] == 'shipping')
180
+ address.sync_needed = false
181
+ address.save! validate: false
182
+
183
+ return address
184
+ end
185
+
186
+ def self.sync_magento_payment_to_local(source, order)
187
+ payment = ::Gemgento::Payment.where(magento_id: source[:payment_id].to_i).first_or_initialize
188
+ payment.payable = order
189
+ payment.magento_id = source[:payment_id]
190
+ payment.increment_id = source[:increment_id]
191
+ payment.is_active = source[:is_active]
192
+ payment.amount_ordered = source[:amount_ordered]
193
+ payment.shipping_amount = source[:shipping_amount]
194
+ payment.base_amount_ordered = source[:base_amount_ordered]
195
+ payment.base_shipping_amount = source[:base_shipping_amount]
196
+ payment.method = source[:method]
197
+ payment.po_number = source[:po_number]
198
+ payment.cc_type = source[:cc_type]
199
+ payment.cc_number_enc = source[:cc_number_enc]
200
+ payment.cc_last4 = source[:cc_last4]
201
+ payment.cc_owner = source[:cc_owner]
202
+ payment.cc_exp_month = source[:cc_exp_month]
203
+ payment.cc_exp_year = source[:cc_exp_year]
204
+ payment.cc_ss_start_month = source[:cc_ss_start_month]
205
+ payment.cc_ss_start_year = source[:cc_ss_start_year]
206
+ payment.save! validate: false
207
+
208
+ payment
209
+ end
210
+
211
+ def self.sync_magento_order_status_to_local(source, order)
212
+ order_status = ::Gemgento::OrderStatus.find_or_initialize_by(order_id: order.id, status: source[:status], comment: source[:comment])
213
+ order_status.order = order
214
+ order_status.status = source[:status]
215
+ order_status.is_active = source[:is_active]
216
+ order_status.is_customer_notified = source[:is_customer_notified].to_i
217
+ order_status.comment = source[:comment]
218
+ order_status.created_at = source[:created_at]
219
+ order_status.save
220
+
221
+ order_status
222
+ end
223
+
224
+ def self.sync_magento_line_item_to_local(source, order)
225
+ line_item = ::Gemgento::LineItem.find_or_initialize_by(itemizable_type: 'Gemgento::Order', magento_id: source[:item_id])
226
+ line_item.itemizable = order
227
+ line_item.product = ::Gemgento::Product.find_by(magento_id: source[:product_id])
228
+
229
+ source.each do |k, v|
230
+ next if [:product_id].include?(k) || !Gemgento::LineItem.column_names.include?(k.to_s)
231
+ line_item.assign_attributes k => v
232
+ end
233
+
234
+ unless source[:gift_message_id].nil?
235
+ gift_message = ::Gemgento::API::SOAP::EnterpriseGiftMessage::GiftMessage.sync_magento_to_local(source[:gift_message])
236
+ line_item.gift_message = gift_message
237
+ line_item.save
238
+ end
239
+
240
+ return line_item
241
+
242
+ rescue ActiveRecord::RecordNotUnique
243
+ return ::Gemgento::LineItem.find_by(itemizable_type: 'Gemgento::Order', magento_id: source[:item_id])
244
+ end
245
+ end
246
+ end
247
+ end
248
+ end
249
+ end