shopify_api 13.1.0 → 13.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (635) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -1
  3. data/.github/workflows/build.yml +4 -0
  4. data/.rubocop.yml +2 -0
  5. data/BREAKING_CHANGES_FOR_V10.md +231 -0
  6. data/CHANGELOG.md +25 -1
  7. data/CONTRIBUTING.md +25 -0
  8. data/Gemfile.lock +23 -17
  9. data/README.md +10 -34
  10. data/ROADMAP.md +10 -0
  11. data/docs/README.md +0 -1
  12. data/docs/getting_started.md +20 -3
  13. data/docs/usage/custom_apps.md +75 -0
  14. data/docs/usage/graphql.md +91 -17
  15. data/docs/usage/oauth.md +160 -27
  16. data/docs/usage/rest.md +216 -59
  17. data/docs/usage/webhooks.md +22 -4
  18. data/lib/shopify_api/admin_versions.rb +3 -1
  19. data/lib/shopify_api/auth/jwt_payload.rb +2 -2
  20. data/lib/shopify_api/auth/oauth.rb +15 -5
  21. data/lib/shopify_api/auth/session.rb +5 -0
  22. data/lib/shopify_api/clients/graphql/client.rb +1 -0
  23. data/lib/shopify_api/clients/http_client.rb +12 -3
  24. data/lib/shopify_api/clients/http_response.rb +29 -2
  25. data/lib/shopify_api/context.rb +18 -5
  26. data/lib/shopify_api/rest/base.rb +35 -14
  27. data/lib/shopify_api/rest/resources/2022_04/abandoned_checkout.rb +7 -3
  28. data/lib/shopify_api/rest/resources/2022_04/access_scope.rb +7 -3
  29. data/lib/shopify_api/rest/resources/2022_04/android_pay_key.rb +7 -3
  30. data/lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb +7 -3
  31. data/lib/shopify_api/rest/resources/2022_04/application_charge.rb +7 -3
  32. data/lib/shopify_api/rest/resources/2022_04/application_credit.rb +7 -3
  33. data/lib/shopify_api/rest/resources/2022_04/article.rb +7 -3
  34. data/lib/shopify_api/rest/resources/2022_04/asset.rb +7 -3
  35. data/lib/shopify_api/rest/resources/2022_04/assigned_fulfillment_order.rb +12 -6
  36. data/lib/shopify_api/rest/resources/2022_04/balance.rb +6 -3
  37. data/lib/shopify_api/rest/resources/2022_04/blog.rb +7 -3
  38. data/lib/shopify_api/rest/resources/2022_04/cancellation_request.rb +7 -3
  39. data/lib/shopify_api/rest/resources/2022_04/carrier_service.rb +7 -3
  40. data/lib/shopify_api/rest/resources/2022_04/checkout.rb +7 -3
  41. data/lib/shopify_api/rest/resources/2022_04/collect.rb +7 -3
  42. data/lib/shopify_api/rest/resources/2022_04/collection.rb +7 -3
  43. data/lib/shopify_api/rest/resources/2022_04/collection_listing.rb +7 -3
  44. data/lib/shopify_api/rest/resources/2022_04/comment.rb +7 -3
  45. data/lib/shopify_api/rest/resources/2022_04/country.rb +7 -3
  46. data/lib/shopify_api/rest/resources/2022_04/currency.rb +7 -3
  47. data/lib/shopify_api/rest/resources/2022_04/custom_collection.rb +7 -3
  48. data/lib/shopify_api/rest/resources/2022_04/customer.rb +7 -3
  49. data/lib/shopify_api/rest/resources/2022_04/customer_address.rb +17 -3
  50. data/lib/shopify_api/rest/resources/2022_04/customer_saved_search.rb +7 -3
  51. data/lib/shopify_api/rest/resources/2022_04/deprecated_api_call.rb +7 -3
  52. data/lib/shopify_api/rest/resources/2022_04/discount_code.rb +7 -3
  53. data/lib/shopify_api/rest/resources/2022_04/dispute.rb +7 -3
  54. data/lib/shopify_api/rest/resources/2022_04/draft_order.rb +7 -3
  55. data/lib/shopify_api/rest/resources/2022_04/event.rb +7 -3
  56. data/lib/shopify_api/rest/resources/2022_04/fulfillment.rb +7 -3
  57. data/lib/shopify_api/rest/resources/2022_04/fulfillment_event.rb +7 -3
  58. data/lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb +7 -3
  59. data/lib/shopify_api/rest/resources/2022_04/fulfillment_request.rb +17 -3
  60. data/lib/shopify_api/rest/resources/2022_04/fulfillment_service.rb +7 -3
  61. data/lib/shopify_api/rest/resources/2022_04/gift_card.rb +7 -3
  62. data/lib/shopify_api/rest/resources/2022_04/gift_card_adjustment.rb +7 -3
  63. data/lib/shopify_api/rest/resources/2022_04/image.rb +7 -3
  64. data/lib/shopify_api/rest/resources/2022_04/inventory_item.rb +7 -3
  65. data/lib/shopify_api/rest/resources/2022_04/inventory_level.rb +7 -3
  66. data/lib/shopify_api/rest/resources/2022_04/location.rb +7 -3
  67. data/lib/shopify_api/rest/resources/2022_04/locations_for_move.rb +7 -3
  68. data/lib/shopify_api/rest/resources/2022_04/marketing_event.rb +7 -3
  69. data/lib/shopify_api/rest/resources/2022_04/metafield.rb +7 -3
  70. data/lib/shopify_api/rest/resources/2022_04/mobile_platform_application.rb +7 -3
  71. data/lib/shopify_api/rest/resources/2022_04/order.rb +7 -3
  72. data/lib/shopify_api/rest/resources/2022_04/order_risk.rb +12 -6
  73. data/lib/shopify_api/rest/resources/2022_04/page.rb +7 -3
  74. data/lib/shopify_api/rest/resources/2022_04/payment.rb +7 -3
  75. data/lib/shopify_api/rest/resources/2022_04/payment_gateway.rb +7 -3
  76. data/lib/shopify_api/rest/resources/2022_04/payment_transaction.rb +7 -3
  77. data/lib/shopify_api/rest/resources/2022_04/payout.rb +7 -3
  78. data/lib/shopify_api/rest/resources/2022_04/policy.rb +7 -3
  79. data/lib/shopify_api/rest/resources/2022_04/price_rule.rb +7 -3
  80. data/lib/shopify_api/rest/resources/2022_04/product.rb +7 -3
  81. data/lib/shopify_api/rest/resources/2022_04/product_listing.rb +7 -3
  82. data/lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb +7 -3
  83. data/lib/shopify_api/rest/resources/2022_04/province.rb +7 -3
  84. data/lib/shopify_api/rest/resources/2022_04/recurring_application_charge.rb +7 -3
  85. data/lib/shopify_api/rest/resources/2022_04/redirect.rb +7 -3
  86. data/lib/shopify_api/rest/resources/2022_04/refund.rb +7 -3
  87. data/lib/shopify_api/rest/resources/2022_04/report.rb +7 -3
  88. data/lib/shopify_api/rest/resources/2022_04/resource_feedback.rb +7 -3
  89. data/lib/shopify_api/rest/resources/2022_04/script_tag.rb +7 -3
  90. data/lib/shopify_api/rest/resources/2022_04/shipping_zone.rb +7 -3
  91. data/lib/shopify_api/rest/resources/2022_04/shop.rb +7 -3
  92. data/lib/shopify_api/rest/resources/2022_04/smart_collection.rb +7 -3
  93. data/lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb +7 -3
  94. data/lib/shopify_api/rest/resources/2022_04/tender_transaction.rb +7 -3
  95. data/lib/shopify_api/rest/resources/2022_04/theme.rb +7 -3
  96. data/lib/shopify_api/rest/resources/2022_04/transaction.rb +7 -3
  97. data/lib/shopify_api/rest/resources/2022_04/usage_charge.rb +7 -3
  98. data/lib/shopify_api/rest/resources/2022_04/user.rb +7 -3
  99. data/lib/shopify_api/rest/resources/2022_04/variant.rb +7 -3
  100. data/lib/shopify_api/rest/resources/2022_04/webhook.rb +7 -3
  101. data/lib/shopify_api/rest/resources/2022_07/abandoned_checkout.rb +7 -3
  102. data/lib/shopify_api/rest/resources/2022_07/access_scope.rb +7 -3
  103. data/lib/shopify_api/rest/resources/2022_07/android_pay_key.rb +7 -3
  104. data/lib/shopify_api/rest/resources/2022_07/apple_pay_certificate.rb +7 -3
  105. data/lib/shopify_api/rest/resources/2022_07/application_charge.rb +7 -3
  106. data/lib/shopify_api/rest/resources/2022_07/application_credit.rb +7 -3
  107. data/lib/shopify_api/rest/resources/2022_07/article.rb +7 -3
  108. data/lib/shopify_api/rest/resources/2022_07/asset.rb +7 -3
  109. data/lib/shopify_api/rest/resources/2022_07/assigned_fulfillment_order.rb +12 -6
  110. data/lib/shopify_api/rest/resources/2022_07/balance.rb +11 -3
  111. data/lib/shopify_api/rest/resources/2022_07/blog.rb +7 -3
  112. data/lib/shopify_api/rest/resources/2022_07/cancellation_request.rb +7 -3
  113. data/lib/shopify_api/rest/resources/2022_07/carrier_service.rb +7 -3
  114. data/lib/shopify_api/rest/resources/2022_07/checkout.rb +7 -3
  115. data/lib/shopify_api/rest/resources/2022_07/collect.rb +7 -3
  116. data/lib/shopify_api/rest/resources/2022_07/collection.rb +7 -3
  117. data/lib/shopify_api/rest/resources/2022_07/collection_listing.rb +7 -3
  118. data/lib/shopify_api/rest/resources/2022_07/comment.rb +7 -3
  119. data/lib/shopify_api/rest/resources/2022_07/country.rb +7 -3
  120. data/lib/shopify_api/rest/resources/2022_07/currency.rb +7 -3
  121. data/lib/shopify_api/rest/resources/2022_07/custom_collection.rb +7 -3
  122. data/lib/shopify_api/rest/resources/2022_07/customer.rb +7 -3
  123. data/lib/shopify_api/rest/resources/2022_07/customer_address.rb +17 -3
  124. data/lib/shopify_api/rest/resources/2022_07/deprecated_api_call.rb +7 -3
  125. data/lib/shopify_api/rest/resources/2022_07/discount_code.rb +7 -3
  126. data/lib/shopify_api/rest/resources/2022_07/dispute.rb +7 -3
  127. data/lib/shopify_api/rest/resources/2022_07/dispute_evidence.rb +7 -3
  128. data/lib/shopify_api/rest/resources/2022_07/dispute_file_upload.rb +7 -3
  129. data/lib/shopify_api/rest/resources/2022_07/draft_order.rb +7 -3
  130. data/lib/shopify_api/rest/resources/2022_07/event.rb +7 -3
  131. data/lib/shopify_api/rest/resources/2022_07/fulfillment.rb +7 -3
  132. data/lib/shopify_api/rest/resources/2022_07/fulfillment_event.rb +7 -3
  133. data/lib/shopify_api/rest/resources/2022_07/fulfillment_order.rb +7 -3
  134. data/lib/shopify_api/rest/resources/2022_07/fulfillment_request.rb +17 -3
  135. data/lib/shopify_api/rest/resources/2022_07/fulfillment_service.rb +7 -3
  136. data/lib/shopify_api/rest/resources/2022_07/gift_card.rb +7 -3
  137. data/lib/shopify_api/rest/resources/2022_07/gift_card_adjustment.rb +7 -3
  138. data/lib/shopify_api/rest/resources/2022_07/image.rb +7 -3
  139. data/lib/shopify_api/rest/resources/2022_07/inventory_item.rb +7 -3
  140. data/lib/shopify_api/rest/resources/2022_07/inventory_level.rb +7 -3
  141. data/lib/shopify_api/rest/resources/2022_07/location.rb +7 -3
  142. data/lib/shopify_api/rest/resources/2022_07/locations_for_move.rb +7 -3
  143. data/lib/shopify_api/rest/resources/2022_07/marketing_event.rb +7 -3
  144. data/lib/shopify_api/rest/resources/2022_07/metafield.rb +7 -3
  145. data/lib/shopify_api/rest/resources/2022_07/mobile_platform_application.rb +7 -3
  146. data/lib/shopify_api/rest/resources/2022_07/order.rb +10 -3
  147. data/lib/shopify_api/rest/resources/2022_07/order_risk.rb +12 -6
  148. data/lib/shopify_api/rest/resources/2022_07/page.rb +7 -3
  149. data/lib/shopify_api/rest/resources/2022_07/payment.rb +7 -3
  150. data/lib/shopify_api/rest/resources/2022_07/payment_gateway.rb +7 -3
  151. data/lib/shopify_api/rest/resources/2022_07/payment_transaction.rb +7 -3
  152. data/lib/shopify_api/rest/resources/2022_07/payout.rb +7 -3
  153. data/lib/shopify_api/rest/resources/2022_07/policy.rb +7 -3
  154. data/lib/shopify_api/rest/resources/2022_07/price_rule.rb +7 -3
  155. data/lib/shopify_api/rest/resources/2022_07/product.rb +7 -3
  156. data/lib/shopify_api/rest/resources/2022_07/product_listing.rb +7 -3
  157. data/lib/shopify_api/rest/resources/2022_07/product_resource_feedback.rb +7 -3
  158. data/lib/shopify_api/rest/resources/2022_07/province.rb +7 -3
  159. data/lib/shopify_api/rest/resources/2022_07/recurring_application_charge.rb +7 -3
  160. data/lib/shopify_api/rest/resources/2022_07/redirect.rb +7 -3
  161. data/lib/shopify_api/rest/resources/2022_07/refund.rb +7 -3
  162. data/lib/shopify_api/rest/resources/2022_07/report.rb +7 -3
  163. data/lib/shopify_api/rest/resources/2022_07/resource_feedback.rb +7 -3
  164. data/lib/shopify_api/rest/resources/2022_07/script_tag.rb +7 -3
  165. data/lib/shopify_api/rest/resources/2022_07/shipping_zone.rb +7 -3
  166. data/lib/shopify_api/rest/resources/2022_07/shop.rb +7 -3
  167. data/lib/shopify_api/rest/resources/2022_07/smart_collection.rb +7 -3
  168. data/lib/shopify_api/rest/resources/2022_07/storefront_access_token.rb +7 -3
  169. data/lib/shopify_api/rest/resources/2022_07/tender_transaction.rb +7 -3
  170. data/lib/shopify_api/rest/resources/2022_07/theme.rb +7 -3
  171. data/lib/shopify_api/rest/resources/2022_07/transaction.rb +7 -3
  172. data/lib/shopify_api/rest/resources/2022_07/usage_charge.rb +7 -3
  173. data/lib/shopify_api/rest/resources/2022_07/user.rb +7 -3
  174. data/lib/shopify_api/rest/resources/2022_07/variant.rb +7 -3
  175. data/lib/shopify_api/rest/resources/2022_07/webhook.rb +7 -3
  176. data/lib/shopify_api/rest/resources/2022_10/abandoned_checkout.rb +7 -3
  177. data/lib/shopify_api/rest/resources/2022_10/access_scope.rb +7 -3
  178. data/lib/shopify_api/rest/resources/2022_10/android_pay_key.rb +7 -3
  179. data/lib/shopify_api/rest/resources/2022_10/apple_pay_certificate.rb +7 -3
  180. data/lib/shopify_api/rest/resources/2022_10/application_charge.rb +7 -3
  181. data/lib/shopify_api/rest/resources/2022_10/application_credit.rb +7 -3
  182. data/lib/shopify_api/rest/resources/2022_10/article.rb +7 -3
  183. data/lib/shopify_api/rest/resources/2022_10/asset.rb +7 -3
  184. data/lib/shopify_api/rest/resources/2022_10/assigned_fulfillment_order.rb +12 -6
  185. data/lib/shopify_api/rest/resources/2022_10/balance.rb +11 -3
  186. data/lib/shopify_api/rest/resources/2022_10/blog.rb +7 -3
  187. data/lib/shopify_api/rest/resources/2022_10/cancellation_request.rb +7 -3
  188. data/lib/shopify_api/rest/resources/2022_10/carrier_service.rb +7 -3
  189. data/lib/shopify_api/rest/resources/2022_10/checkout.rb +7 -3
  190. data/lib/shopify_api/rest/resources/2022_10/collect.rb +7 -3
  191. data/lib/shopify_api/rest/resources/2022_10/collection.rb +7 -3
  192. data/lib/shopify_api/rest/resources/2022_10/collection_listing.rb +7 -3
  193. data/lib/shopify_api/rest/resources/2022_10/comment.rb +7 -3
  194. data/lib/shopify_api/rest/resources/2022_10/country.rb +7 -3
  195. data/lib/shopify_api/rest/resources/2022_10/currency.rb +7 -3
  196. data/lib/shopify_api/rest/resources/2022_10/custom_collection.rb +7 -3
  197. data/lib/shopify_api/rest/resources/2022_10/customer.rb +7 -3
  198. data/lib/shopify_api/rest/resources/2022_10/customer_address.rb +17 -3
  199. data/lib/shopify_api/rest/resources/2022_10/deprecated_api_call.rb +7 -3
  200. data/lib/shopify_api/rest/resources/2022_10/discount_code.rb +7 -3
  201. data/lib/shopify_api/rest/resources/2022_10/dispute.rb +7 -3
  202. data/lib/shopify_api/rest/resources/2022_10/dispute_evidence.rb +7 -3
  203. data/lib/shopify_api/rest/resources/2022_10/dispute_file_upload.rb +7 -3
  204. data/lib/shopify_api/rest/resources/2022_10/draft_order.rb +7 -3
  205. data/lib/shopify_api/rest/resources/2022_10/event.rb +7 -3
  206. data/lib/shopify_api/rest/resources/2022_10/fulfillment.rb +7 -3
  207. data/lib/shopify_api/rest/resources/2022_10/fulfillment_event.rb +7 -3
  208. data/lib/shopify_api/rest/resources/2022_10/fulfillment_order.rb +7 -3
  209. data/lib/shopify_api/rest/resources/2022_10/fulfillment_request.rb +17 -3
  210. data/lib/shopify_api/rest/resources/2022_10/fulfillment_service.rb +7 -3
  211. data/lib/shopify_api/rest/resources/2022_10/gift_card.rb +7 -3
  212. data/lib/shopify_api/rest/resources/2022_10/gift_card_adjustment.rb +7 -3
  213. data/lib/shopify_api/rest/resources/2022_10/image.rb +7 -3
  214. data/lib/shopify_api/rest/resources/2022_10/inventory_item.rb +7 -3
  215. data/lib/shopify_api/rest/resources/2022_10/inventory_level.rb +7 -3
  216. data/lib/shopify_api/rest/resources/2022_10/location.rb +7 -3
  217. data/lib/shopify_api/rest/resources/2022_10/locations_for_move.rb +7 -3
  218. data/lib/shopify_api/rest/resources/2022_10/marketing_event.rb +7 -3
  219. data/lib/shopify_api/rest/resources/2022_10/metafield.rb +7 -3
  220. data/lib/shopify_api/rest/resources/2022_10/mobile_platform_application.rb +7 -3
  221. data/lib/shopify_api/rest/resources/2022_10/order.rb +10 -3
  222. data/lib/shopify_api/rest/resources/2022_10/order_risk.rb +12 -6
  223. data/lib/shopify_api/rest/resources/2022_10/page.rb +7 -3
  224. data/lib/shopify_api/rest/resources/2022_10/payment.rb +7 -3
  225. data/lib/shopify_api/rest/resources/2022_10/payment_gateway.rb +7 -3
  226. data/lib/shopify_api/rest/resources/2022_10/payment_transaction.rb +7 -3
  227. data/lib/shopify_api/rest/resources/2022_10/payout.rb +7 -3
  228. data/lib/shopify_api/rest/resources/2022_10/policy.rb +7 -3
  229. data/lib/shopify_api/rest/resources/2022_10/price_rule.rb +7 -3
  230. data/lib/shopify_api/rest/resources/2022_10/product.rb +7 -3
  231. data/lib/shopify_api/rest/resources/2022_10/product_listing.rb +7 -3
  232. data/lib/shopify_api/rest/resources/2022_10/product_resource_feedback.rb +7 -3
  233. data/lib/shopify_api/rest/resources/2022_10/province.rb +7 -3
  234. data/lib/shopify_api/rest/resources/2022_10/recurring_application_charge.rb +7 -3
  235. data/lib/shopify_api/rest/resources/2022_10/redirect.rb +7 -3
  236. data/lib/shopify_api/rest/resources/2022_10/refund.rb +7 -3
  237. data/lib/shopify_api/rest/resources/2022_10/report.rb +7 -3
  238. data/lib/shopify_api/rest/resources/2022_10/resource_feedback.rb +7 -3
  239. data/lib/shopify_api/rest/resources/2022_10/script_tag.rb +7 -3
  240. data/lib/shopify_api/rest/resources/2022_10/shipping_zone.rb +7 -3
  241. data/lib/shopify_api/rest/resources/2022_10/shop.rb +7 -6
  242. data/lib/shopify_api/rest/resources/2022_10/smart_collection.rb +7 -3
  243. data/lib/shopify_api/rest/resources/2022_10/storefront_access_token.rb +7 -3
  244. data/lib/shopify_api/rest/resources/2022_10/tender_transaction.rb +7 -3
  245. data/lib/shopify_api/rest/resources/2022_10/theme.rb +7 -3
  246. data/lib/shopify_api/rest/resources/2022_10/transaction.rb +7 -3
  247. data/lib/shopify_api/rest/resources/2022_10/usage_charge.rb +7 -3
  248. data/lib/shopify_api/rest/resources/2022_10/user.rb +7 -3
  249. data/lib/shopify_api/rest/resources/2022_10/variant.rb +8 -8
  250. data/lib/shopify_api/rest/resources/2022_10/webhook.rb +7 -3
  251. data/lib/shopify_api/rest/resources/2023_01/abandoned_checkout.rb +7 -3
  252. data/lib/shopify_api/rest/resources/2023_01/access_scope.rb +7 -3
  253. data/lib/shopify_api/rest/resources/2023_01/apple_pay_certificate.rb +7 -3
  254. data/lib/shopify_api/rest/resources/2023_01/application_charge.rb +7 -3
  255. data/lib/shopify_api/rest/resources/2023_01/application_credit.rb +7 -3
  256. data/lib/shopify_api/rest/resources/2023_01/article.rb +7 -3
  257. data/lib/shopify_api/rest/resources/2023_01/asset.rb +7 -3
  258. data/lib/shopify_api/rest/resources/2023_01/assigned_fulfillment_order.rb +12 -6
  259. data/lib/shopify_api/rest/resources/2023_01/balance.rb +11 -3
  260. data/lib/shopify_api/rest/resources/2023_01/blog.rb +7 -3
  261. data/lib/shopify_api/rest/resources/2023_01/cancellation_request.rb +7 -3
  262. data/lib/shopify_api/rest/resources/2023_01/carrier_service.rb +7 -3
  263. data/lib/shopify_api/rest/resources/2023_01/checkout.rb +7 -3
  264. data/lib/shopify_api/rest/resources/2023_01/collect.rb +7 -3
  265. data/lib/shopify_api/rest/resources/2023_01/collection.rb +7 -3
  266. data/lib/shopify_api/rest/resources/2023_01/collection_listing.rb +7 -3
  267. data/lib/shopify_api/rest/resources/2023_01/comment.rb +7 -3
  268. data/lib/shopify_api/rest/resources/2023_01/country.rb +7 -3
  269. data/lib/shopify_api/rest/resources/2023_01/currency.rb +7 -3
  270. data/lib/shopify_api/rest/resources/2023_01/custom_collection.rb +7 -3
  271. data/lib/shopify_api/rest/resources/2023_01/customer.rb +7 -3
  272. data/lib/shopify_api/rest/resources/2023_01/customer_address.rb +17 -3
  273. data/lib/shopify_api/rest/resources/2023_01/customer_saved_search.rb +7 -3
  274. data/lib/shopify_api/rest/resources/2023_01/deprecated_api_call.rb +7 -3
  275. data/lib/shopify_api/rest/resources/2023_01/discount_code.rb +7 -3
  276. data/lib/shopify_api/rest/resources/2023_01/dispute.rb +7 -3
  277. data/lib/shopify_api/rest/resources/2023_01/dispute_evidence.rb +7 -3
  278. data/lib/shopify_api/rest/resources/2023_01/dispute_file_upload.rb +7 -3
  279. data/lib/shopify_api/rest/resources/2023_01/draft_order.rb +7 -3
  280. data/lib/shopify_api/rest/resources/2023_01/event.rb +7 -3
  281. data/lib/shopify_api/rest/resources/2023_01/fulfillment.rb +7 -3
  282. data/lib/shopify_api/rest/resources/2023_01/fulfillment_event.rb +7 -3
  283. data/lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb +12 -6
  284. data/lib/shopify_api/rest/resources/2023_01/fulfillment_request.rb +17 -3
  285. data/lib/shopify_api/rest/resources/2023_01/fulfillment_service.rb +7 -3
  286. data/lib/shopify_api/rest/resources/2023_01/gift_card.rb +7 -3
  287. data/lib/shopify_api/rest/resources/2023_01/gift_card_adjustment.rb +7 -3
  288. data/lib/shopify_api/rest/resources/2023_01/image.rb +7 -3
  289. data/lib/shopify_api/rest/resources/2023_01/inventory_item.rb +7 -3
  290. data/lib/shopify_api/rest/resources/2023_01/inventory_level.rb +7 -3
  291. data/lib/shopify_api/rest/resources/2023_01/location.rb +7 -3
  292. data/lib/shopify_api/rest/resources/2023_01/locations_for_move.rb +7 -3
  293. data/lib/shopify_api/rest/resources/2023_01/marketing_event.rb +7 -3
  294. data/lib/shopify_api/rest/resources/2023_01/metafield.rb +7 -3
  295. data/lib/shopify_api/rest/resources/2023_01/mobile_platform_application.rb +7 -3
  296. data/lib/shopify_api/rest/resources/2023_01/order.rb +10 -3
  297. data/lib/shopify_api/rest/resources/2023_01/order_risk.rb +12 -6
  298. data/lib/shopify_api/rest/resources/2023_01/page.rb +7 -3
  299. data/lib/shopify_api/rest/resources/2023_01/payment.rb +7 -3
  300. data/lib/shopify_api/rest/resources/2023_01/payment_gateway.rb +7 -3
  301. data/lib/shopify_api/rest/resources/2023_01/payment_transaction.rb +12 -5
  302. data/lib/shopify_api/rest/resources/2023_01/payout.rb +7 -3
  303. data/lib/shopify_api/rest/resources/2023_01/policy.rb +7 -3
  304. data/lib/shopify_api/rest/resources/2023_01/price_rule.rb +7 -3
  305. data/lib/shopify_api/rest/resources/2023_01/product.rb +7 -3
  306. data/lib/shopify_api/rest/resources/2023_01/product_listing.rb +7 -3
  307. data/lib/shopify_api/rest/resources/2023_01/product_resource_feedback.rb +7 -3
  308. data/lib/shopify_api/rest/resources/2023_01/province.rb +7 -3
  309. data/lib/shopify_api/rest/resources/2023_01/recurring_application_charge.rb +7 -3
  310. data/lib/shopify_api/rest/resources/2023_01/redirect.rb +7 -3
  311. data/lib/shopify_api/rest/resources/2023_01/refund.rb +7 -3
  312. data/lib/shopify_api/rest/resources/2023_01/report.rb +7 -3
  313. data/lib/shopify_api/rest/resources/2023_01/resource_feedback.rb +7 -3
  314. data/lib/shopify_api/rest/resources/2023_01/script_tag.rb +7 -3
  315. data/lib/shopify_api/rest/resources/2023_01/shipping_zone.rb +7 -3
  316. data/lib/shopify_api/rest/resources/2023_01/shop.rb +7 -6
  317. data/lib/shopify_api/rest/resources/2023_01/smart_collection.rb +7 -3
  318. data/lib/shopify_api/rest/resources/2023_01/storefront_access_token.rb +7 -3
  319. data/lib/shopify_api/rest/resources/2023_01/tender_transaction.rb +7 -3
  320. data/lib/shopify_api/rest/resources/2023_01/theme.rb +7 -3
  321. data/lib/shopify_api/rest/resources/2023_01/transaction.rb +7 -3
  322. data/lib/shopify_api/rest/resources/2023_01/usage_charge.rb +7 -3
  323. data/lib/shopify_api/rest/resources/2023_01/user.rb +7 -3
  324. data/lib/shopify_api/rest/resources/2023_01/variant.rb +8 -8
  325. data/lib/shopify_api/rest/resources/2023_01/webhook.rb +7 -3
  326. data/lib/shopify_api/rest/resources/2023_04/abandoned_checkout.rb +7 -3
  327. data/lib/shopify_api/rest/resources/2023_04/access_scope.rb +7 -3
  328. data/lib/shopify_api/rest/resources/2023_04/apple_pay_certificate.rb +7 -3
  329. data/lib/shopify_api/rest/resources/2023_04/application_charge.rb +7 -3
  330. data/lib/shopify_api/rest/resources/2023_04/application_credit.rb +7 -3
  331. data/lib/shopify_api/rest/resources/2023_04/article.rb +7 -3
  332. data/lib/shopify_api/rest/resources/2023_04/asset.rb +7 -3
  333. data/lib/shopify_api/rest/resources/2023_04/assigned_fulfillment_order.rb +12 -6
  334. data/lib/shopify_api/rest/resources/2023_04/balance.rb +11 -3
  335. data/lib/shopify_api/rest/resources/2023_04/blog.rb +7 -3
  336. data/lib/shopify_api/rest/resources/2023_04/cancellation_request.rb +7 -3
  337. data/lib/shopify_api/rest/resources/2023_04/carrier_service.rb +7 -3
  338. data/lib/shopify_api/rest/resources/2023_04/checkout.rb +7 -3
  339. data/lib/shopify_api/rest/resources/2023_04/collect.rb +7 -3
  340. data/lib/shopify_api/rest/resources/2023_04/collection.rb +7 -3
  341. data/lib/shopify_api/rest/resources/2023_04/collection_listing.rb +7 -3
  342. data/lib/shopify_api/rest/resources/2023_04/comment.rb +7 -3
  343. data/lib/shopify_api/rest/resources/2023_04/country.rb +7 -3
  344. data/lib/shopify_api/rest/resources/2023_04/currency.rb +7 -3
  345. data/lib/shopify_api/rest/resources/2023_04/custom_collection.rb +7 -3
  346. data/lib/shopify_api/rest/resources/2023_04/customer.rb +7 -3
  347. data/lib/shopify_api/rest/resources/2023_04/customer_address.rb +17 -3
  348. data/lib/shopify_api/rest/resources/2023_04/customer_saved_search.rb +7 -3
  349. data/lib/shopify_api/rest/resources/2023_04/deprecated_api_call.rb +7 -3
  350. data/lib/shopify_api/rest/resources/2023_04/discount_code.rb +7 -3
  351. data/lib/shopify_api/rest/resources/2023_04/dispute.rb +7 -3
  352. data/lib/shopify_api/rest/resources/2023_04/dispute_evidence.rb +7 -3
  353. data/lib/shopify_api/rest/resources/2023_04/dispute_file_upload.rb +7 -3
  354. data/lib/shopify_api/rest/resources/2023_04/draft_order.rb +7 -3
  355. data/lib/shopify_api/rest/resources/2023_04/event.rb +7 -3
  356. data/lib/shopify_api/rest/resources/2023_04/fulfillment.rb +7 -3
  357. data/lib/shopify_api/rest/resources/2023_04/fulfillment_event.rb +7 -3
  358. data/lib/shopify_api/rest/resources/2023_04/fulfillment_order.rb +12 -6
  359. data/lib/shopify_api/rest/resources/2023_04/fulfillment_request.rb +17 -3
  360. data/lib/shopify_api/rest/resources/2023_04/fulfillment_service.rb +7 -3
  361. data/lib/shopify_api/rest/resources/2023_04/gift_card.rb +7 -3
  362. data/lib/shopify_api/rest/resources/2023_04/gift_card_adjustment.rb +7 -3
  363. data/lib/shopify_api/rest/resources/2023_04/image.rb +7 -3
  364. data/lib/shopify_api/rest/resources/2023_04/inventory_item.rb +7 -3
  365. data/lib/shopify_api/rest/resources/2023_04/inventory_level.rb +7 -3
  366. data/lib/shopify_api/rest/resources/2023_04/location.rb +7 -3
  367. data/lib/shopify_api/rest/resources/2023_04/locations_for_move.rb +7 -3
  368. data/lib/shopify_api/rest/resources/2023_04/marketing_event.rb +7 -3
  369. data/lib/shopify_api/rest/resources/2023_04/metafield.rb +7 -3
  370. data/lib/shopify_api/rest/resources/2023_04/mobile_platform_application.rb +7 -3
  371. data/lib/shopify_api/rest/resources/2023_04/order.rb +10 -9
  372. data/lib/shopify_api/rest/resources/2023_04/order_risk.rb +12 -6
  373. data/lib/shopify_api/rest/resources/2023_04/page.rb +7 -3
  374. data/lib/shopify_api/rest/resources/2023_04/payment.rb +7 -3
  375. data/lib/shopify_api/rest/resources/2023_04/payment_gateway.rb +7 -3
  376. data/lib/shopify_api/rest/resources/2023_04/payment_transaction.rb +12 -5
  377. data/lib/shopify_api/rest/resources/2023_04/payout.rb +7 -3
  378. data/lib/shopify_api/rest/resources/2023_04/policy.rb +7 -3
  379. data/lib/shopify_api/rest/resources/2023_04/price_rule.rb +7 -3
  380. data/lib/shopify_api/rest/resources/2023_04/product.rb +7 -3
  381. data/lib/shopify_api/rest/resources/2023_04/product_listing.rb +7 -3
  382. data/lib/shopify_api/rest/resources/2023_04/product_resource_feedback.rb +7 -3
  383. data/lib/shopify_api/rest/resources/2023_04/province.rb +7 -3
  384. data/lib/shopify_api/rest/resources/2023_04/recurring_application_charge.rb +7 -3
  385. data/lib/shopify_api/rest/resources/2023_04/redirect.rb +7 -3
  386. data/lib/shopify_api/rest/resources/2023_04/refund.rb +7 -3
  387. data/lib/shopify_api/rest/resources/2023_04/report.rb +7 -3
  388. data/lib/shopify_api/rest/resources/2023_04/resource_feedback.rb +7 -3
  389. data/lib/shopify_api/rest/resources/2023_04/script_tag.rb +7 -3
  390. data/lib/shopify_api/rest/resources/2023_04/shipping_zone.rb +7 -3
  391. data/lib/shopify_api/rest/resources/2023_04/shop.rb +7 -6
  392. data/lib/shopify_api/rest/resources/2023_04/smart_collection.rb +7 -3
  393. data/lib/shopify_api/rest/resources/2023_04/storefront_access_token.rb +7 -3
  394. data/lib/shopify_api/rest/resources/2023_04/tender_transaction.rb +7 -3
  395. data/lib/shopify_api/rest/resources/2023_04/theme.rb +7 -3
  396. data/lib/shopify_api/rest/resources/2023_04/transaction.rb +7 -3
  397. data/lib/shopify_api/rest/resources/2023_04/usage_charge.rb +7 -3
  398. data/lib/shopify_api/rest/resources/2023_04/user.rb +7 -3
  399. data/lib/shopify_api/rest/resources/2023_04/variant.rb +8 -8
  400. data/lib/shopify_api/rest/resources/2023_04/webhook.rb +7 -3
  401. data/lib/shopify_api/rest/resources/2023_07/abandoned_checkout.rb +7 -3
  402. data/lib/shopify_api/rest/resources/2023_07/access_scope.rb +7 -3
  403. data/lib/shopify_api/rest/resources/2023_07/apple_pay_certificate.rb +7 -3
  404. data/lib/shopify_api/rest/resources/2023_07/application_charge.rb +7 -3
  405. data/lib/shopify_api/rest/resources/2023_07/application_credit.rb +7 -3
  406. data/lib/shopify_api/rest/resources/2023_07/article.rb +7 -3
  407. data/lib/shopify_api/rest/resources/2023_07/asset.rb +7 -3
  408. data/lib/shopify_api/rest/resources/2023_07/assigned_fulfillment_order.rb +12 -6
  409. data/lib/shopify_api/rest/resources/2023_07/balance.rb +11 -3
  410. data/lib/shopify_api/rest/resources/2023_07/blog.rb +7 -3
  411. data/lib/shopify_api/rest/resources/2023_07/cancellation_request.rb +7 -3
  412. data/lib/shopify_api/rest/resources/2023_07/carrier_service.rb +7 -3
  413. data/lib/shopify_api/rest/resources/2023_07/checkout.rb +7 -3
  414. data/lib/shopify_api/rest/resources/2023_07/collect.rb +7 -3
  415. data/lib/shopify_api/rest/resources/2023_07/collection.rb +7 -3
  416. data/lib/shopify_api/rest/resources/2023_07/collection_listing.rb +7 -3
  417. data/lib/shopify_api/rest/resources/2023_07/comment.rb +7 -3
  418. data/lib/shopify_api/rest/resources/2023_07/country.rb +7 -3
  419. data/lib/shopify_api/rest/resources/2023_07/currency.rb +7 -3
  420. data/lib/shopify_api/rest/resources/2023_07/custom_collection.rb +7 -3
  421. data/lib/shopify_api/rest/resources/2023_07/customer.rb +7 -3
  422. data/lib/shopify_api/rest/resources/2023_07/customer_address.rb +17 -3
  423. data/lib/shopify_api/rest/resources/2023_07/customer_saved_search.rb +7 -3
  424. data/lib/shopify_api/rest/resources/2023_07/deprecated_api_call.rb +7 -3
  425. data/lib/shopify_api/rest/resources/2023_07/discount_code.rb +7 -3
  426. data/lib/shopify_api/rest/resources/2023_07/dispute.rb +7 -3
  427. data/lib/shopify_api/rest/resources/2023_07/dispute_evidence.rb +7 -3
  428. data/lib/shopify_api/rest/resources/2023_07/dispute_file_upload.rb +7 -3
  429. data/lib/shopify_api/rest/resources/2023_07/draft_order.rb +7 -3
  430. data/lib/shopify_api/rest/resources/2023_07/event.rb +7 -3
  431. data/lib/shopify_api/rest/resources/2023_07/fulfillment.rb +7 -3
  432. data/lib/shopify_api/rest/resources/2023_07/fulfillment_event.rb +7 -3
  433. data/lib/shopify_api/rest/resources/2023_07/fulfillment_order.rb +12 -6
  434. data/lib/shopify_api/rest/resources/2023_07/fulfillment_request.rb +17 -3
  435. data/lib/shopify_api/rest/resources/2023_07/fulfillment_service.rb +7 -3
  436. data/lib/shopify_api/rest/resources/2023_07/gift_card.rb +7 -3
  437. data/lib/shopify_api/rest/resources/2023_07/gift_card_adjustment.rb +7 -3
  438. data/lib/shopify_api/rest/resources/2023_07/image.rb +7 -3
  439. data/lib/shopify_api/rest/resources/2023_07/inventory_item.rb +7 -3
  440. data/lib/shopify_api/rest/resources/2023_07/inventory_level.rb +7 -3
  441. data/lib/shopify_api/rest/resources/2023_07/location.rb +7 -3
  442. data/lib/shopify_api/rest/resources/2023_07/locations_for_move.rb +7 -3
  443. data/lib/shopify_api/rest/resources/2023_07/marketing_event.rb +7 -3
  444. data/lib/shopify_api/rest/resources/2023_07/metafield.rb +7 -3
  445. data/lib/shopify_api/rest/resources/2023_07/mobile_platform_application.rb +7 -3
  446. data/lib/shopify_api/rest/resources/2023_07/order.rb +10 -9
  447. data/lib/shopify_api/rest/resources/2023_07/order_risk.rb +12 -6
  448. data/lib/shopify_api/rest/resources/2023_07/page.rb +7 -3
  449. data/lib/shopify_api/rest/resources/2023_07/payment.rb +7 -3
  450. data/lib/shopify_api/rest/resources/2023_07/payment_gateway.rb +7 -3
  451. data/lib/shopify_api/rest/resources/2023_07/payment_transaction.rb +12 -5
  452. data/lib/shopify_api/rest/resources/2023_07/payout.rb +7 -3
  453. data/lib/shopify_api/rest/resources/2023_07/policy.rb +7 -3
  454. data/lib/shopify_api/rest/resources/2023_07/price_rule.rb +7 -3
  455. data/lib/shopify_api/rest/resources/2023_07/product.rb +7 -3
  456. data/lib/shopify_api/rest/resources/2023_07/product_listing.rb +7 -3
  457. data/lib/shopify_api/rest/resources/2023_07/product_resource_feedback.rb +7 -3
  458. data/lib/shopify_api/rest/resources/2023_07/province.rb +7 -3
  459. data/lib/shopify_api/rest/resources/2023_07/recurring_application_charge.rb +7 -3
  460. data/lib/shopify_api/rest/resources/2023_07/redirect.rb +7 -3
  461. data/lib/shopify_api/rest/resources/2023_07/refund.rb +7 -3
  462. data/lib/shopify_api/rest/resources/2023_07/report.rb +125 -0
  463. data/lib/shopify_api/rest/resources/2023_07/resource_feedback.rb +7 -3
  464. data/lib/shopify_api/rest/resources/2023_07/script_tag.rb +7 -3
  465. data/lib/shopify_api/rest/resources/2023_07/shipping_zone.rb +7 -3
  466. data/lib/shopify_api/rest/resources/2023_07/shop.rb +7 -6
  467. data/lib/shopify_api/rest/resources/2023_07/smart_collection.rb +7 -3
  468. data/lib/shopify_api/rest/resources/2023_07/storefront_access_token.rb +7 -3
  469. data/lib/shopify_api/rest/resources/2023_07/tender_transaction.rb +7 -3
  470. data/lib/shopify_api/rest/resources/2023_07/theme.rb +7 -3
  471. data/lib/shopify_api/rest/resources/2023_07/transaction.rb +7 -3
  472. data/lib/shopify_api/rest/resources/2023_07/usage_charge.rb +7 -3
  473. data/lib/shopify_api/rest/resources/2023_07/user.rb +7 -3
  474. data/lib/shopify_api/rest/resources/2023_07/variant.rb +8 -8
  475. data/lib/shopify_api/rest/resources/2023_07/webhook.rb +7 -3
  476. data/lib/shopify_api/rest/resources/2023_10/abandoned_checkout.rb +194 -0
  477. data/lib/shopify_api/rest/resources/2023_10/access_scope.rb +62 -0
  478. data/lib/shopify_api/rest/resources/2023_10/apple_pay_certificate.rb +109 -0
  479. data/lib/shopify_api/rest/resources/2023_10/application_charge.rb +113 -0
  480. data/lib/shopify_api/rest/resources/2023_10/application_credit.rb +95 -0
  481. data/lib/shopify_api/rest/resources/2023_10/article.rb +269 -0
  482. data/lib/shopify_api/rest/resources/2023_10/asset.rb +122 -0
  483. data/lib/shopify_api/rest/resources/2023_10/assigned_fulfillment_order.rb +92 -0
  484. data/lib/shopify_api/rest/resources/2023_10/balance.rb +58 -0
  485. data/lib/shopify_api/rest/resources/2023_10/blog.rb +166 -0
  486. data/lib/shopify_api/rest/resources/2023_10/cancellation_request.rb +87 -0
  487. data/lib/shopify_api/rest/resources/2023_10/carrier_service.rb +120 -0
  488. data/lib/shopify_api/rest/resources/2023_10/checkout.rb +213 -0
  489. data/lib/shopify_api/rest/resources/{2022_10/customer_saved_search.rb → 2023_10/collect.rb} +29 -52
  490. data/lib/shopify_api/rest/resources/2023_10/collection.rb +114 -0
  491. data/lib/shopify_api/rest/resources/2023_10/collection_listing.rb +159 -0
  492. data/lib/shopify_api/rest/resources/2023_10/comment.rb +287 -0
  493. data/lib/shopify_api/rest/resources/2023_10/country.rb +141 -0
  494. data/lib/shopify_api/rest/resources/2023_10/currency.rb +61 -0
  495. data/lib/shopify_api/rest/resources/2023_10/custom_collection.rb +191 -0
  496. data/lib/shopify_api/rest/resources/2023_10/customer.rb +333 -0
  497. data/lib/shopify_api/rest/resources/2023_10/customer_address.rb +215 -0
  498. data/lib/shopify_api/rest/resources/2023_10/deprecated_api_call.rb +61 -0
  499. data/lib/shopify_api/rest/resources/2023_10/discount_code.rb +226 -0
  500. data/lib/shopify_api/rest/resources/2023_10/dispute.rb +115 -0
  501. data/lib/shopify_api/rest/resources/2023_10/dispute_evidence.rb +121 -0
  502. data/lib/shopify_api/rest/resources/2023_10/dispute_file_upload.rb +85 -0
  503. data/lib/shopify_api/rest/resources/2023_10/draft_order.rb +279 -0
  504. data/lib/shopify_api/rest/resources/2023_10/event.rb +152 -0
  505. data/lib/shopify_api/rest/resources/2023_10/fulfillment.rb +235 -0
  506. data/lib/shopify_api/rest/resources/2023_10/fulfillment_event.rb +170 -0
  507. data/lib/shopify_api/rest/resources/2023_10/fulfillment_order.rb +318 -0
  508. data/lib/shopify_api/rest/resources/2023_10/fulfillment_request.rb +101 -0
  509. data/lib/shopify_api/rest/resources/2023_10/fulfillment_service.rb +134 -0
  510. data/lib/shopify_api/rest/resources/2023_10/gift_card.rb +222 -0
  511. data/lib/shopify_api/rest/resources/2023_10/gift_card_adjustment.rb +122 -0
  512. data/lib/shopify_api/rest/resources/2023_10/image.rb +161 -0
  513. data/lib/shopify_api/rest/resources/2023_10/inventory_item.rb +112 -0
  514. data/lib/shopify_api/rest/resources/2023_10/inventory_level.rb +183 -0
  515. data/lib/shopify_api/rest/resources/2023_10/location.rb +171 -0
  516. data/lib/shopify_api/rest/resources/2023_10/locations_for_move.rb +60 -0
  517. data/lib/shopify_api/rest/resources/2023_10/marketing_event.rb +213 -0
  518. data/lib/shopify_api/rest/resources/2023_10/metafield.rb +348 -0
  519. data/lib/shopify_api/rest/resources/2023_10/mobile_platform_application.rb +114 -0
  520. data/lib/shopify_api/rest/resources/2023_10/order.rb +489 -0
  521. data/lib/shopify_api/rest/resources/2023_10/order_risk.rb +148 -0
  522. data/lib/shopify_api/rest/resources/2023_10/page.rb +198 -0
  523. data/lib/shopify_api/rest/resources/2023_10/payment.rb +144 -0
  524. data/lib/shopify_api/rest/resources/2023_10/payment_gateway.rb +147 -0
  525. data/lib/shopify_api/rest/resources/2023_10/payment_transaction.rb +114 -0
  526. data/lib/shopify_api/rest/resources/2023_10/payout.rb +101 -0
  527. data/lib/shopify_api/rest/resources/2023_10/policy.rb +73 -0
  528. data/lib/shopify_api/rest/resources/2023_10/price_rule.rb +227 -0
  529. data/lib/shopify_api/rest/resources/2023_10/product.rb +227 -0
  530. data/lib/shopify_api/rest/resources/2023_10/product_listing.rb +200 -0
  531. data/lib/shopify_api/rest/resources/2023_10/product_resource_feedback.rb +92 -0
  532. data/lib/shopify_api/rest/resources/2023_10/province.rb +136 -0
  533. data/lib/shopify_api/rest/resources/2023_10/recurring_application_charge.rb +176 -0
  534. data/lib/shopify_api/rest/resources/2023_10/redirect.rb +143 -0
  535. data/lib/shopify_api/rest/resources/2023_10/refund.rb +155 -0
  536. data/lib/shopify_api/rest/resources/2023_10/report.rb +125 -0
  537. data/lib/shopify_api/rest/resources/2023_10/resource_feedback.rb +77 -0
  538. data/lib/shopify_api/rest/resources/2023_10/script_tag.rb +159 -0
  539. data/lib/shopify_api/rest/resources/2023_10/shipping_zone.rb +87 -0
  540. data/lib/shopify_api/rest/resources/2023_10/shop.rb +222 -0
  541. data/lib/shopify_api/rest/resources/2023_10/smart_collection.rb +220 -0
  542. data/lib/shopify_api/rest/resources/2023_10/storefront_access_token.rb +91 -0
  543. data/lib/shopify_api/rest/resources/2023_10/tender_transaction.rb +97 -0
  544. data/lib/shopify_api/rest/resources/2023_10/theme.rb +127 -0
  545. data/lib/shopify_api/rest/resources/2023_10/transaction.rb +188 -0
  546. data/lib/shopify_api/rest/resources/2023_10/usage_charge.rb +106 -0
  547. data/lib/shopify_api/rest/resources/2023_10/user.rb +142 -0
  548. data/lib/shopify_api/rest/resources/2023_10/variant.rb +212 -0
  549. data/lib/shopify_api/rest/resources/2023_10/webhook.rb +172 -0
  550. data/lib/shopify_api/rest/resources/2024_01/abandoned_checkout.rb +194 -0
  551. data/lib/shopify_api/rest/resources/2024_01/access_scope.rb +62 -0
  552. data/lib/shopify_api/rest/resources/2024_01/apple_pay_certificate.rb +109 -0
  553. data/lib/shopify_api/rest/resources/2024_01/application_charge.rb +113 -0
  554. data/lib/shopify_api/rest/resources/2024_01/application_credit.rb +95 -0
  555. data/lib/shopify_api/rest/resources/2024_01/article.rb +269 -0
  556. data/lib/shopify_api/rest/resources/2024_01/asset.rb +122 -0
  557. data/lib/shopify_api/rest/resources/2024_01/assigned_fulfillment_order.rb +92 -0
  558. data/lib/shopify_api/rest/resources/2024_01/balance.rb +58 -0
  559. data/lib/shopify_api/rest/resources/2024_01/blog.rb +166 -0
  560. data/lib/shopify_api/rest/resources/2024_01/cancellation_request.rb +87 -0
  561. data/lib/shopify_api/rest/resources/2024_01/carrier_service.rb +120 -0
  562. data/lib/shopify_api/rest/resources/2024_01/checkout.rb +213 -0
  563. data/lib/shopify_api/rest/resources/{2022_07/customer_saved_search.rb → 2024_01/collect.rb} +29 -52
  564. data/lib/shopify_api/rest/resources/2024_01/collection.rb +114 -0
  565. data/lib/shopify_api/rest/resources/2024_01/collection_listing.rb +159 -0
  566. data/lib/shopify_api/rest/resources/2024_01/comment.rb +287 -0
  567. data/lib/shopify_api/rest/resources/2024_01/country.rb +141 -0
  568. data/lib/shopify_api/rest/resources/2024_01/currency.rb +61 -0
  569. data/lib/shopify_api/rest/resources/2024_01/custom_collection.rb +191 -0
  570. data/lib/shopify_api/rest/resources/2024_01/customer.rb +333 -0
  571. data/lib/shopify_api/rest/resources/2024_01/customer_address.rb +215 -0
  572. data/lib/shopify_api/rest/resources/2024_01/deprecated_api_call.rb +61 -0
  573. data/lib/shopify_api/rest/resources/2024_01/discount_code.rb +226 -0
  574. data/lib/shopify_api/rest/resources/2024_01/dispute.rb +115 -0
  575. data/lib/shopify_api/rest/resources/2024_01/dispute_evidence.rb +121 -0
  576. data/lib/shopify_api/rest/resources/2024_01/dispute_file_upload.rb +85 -0
  577. data/lib/shopify_api/rest/resources/2024_01/draft_order.rb +279 -0
  578. data/lib/shopify_api/rest/resources/2024_01/event.rb +152 -0
  579. data/lib/shopify_api/rest/resources/2024_01/fulfillment.rb +235 -0
  580. data/lib/shopify_api/rest/resources/2024_01/fulfillment_event.rb +170 -0
  581. data/lib/shopify_api/rest/resources/2024_01/fulfillment_order.rb +326 -0
  582. data/lib/shopify_api/rest/resources/2024_01/fulfillment_request.rb +101 -0
  583. data/lib/shopify_api/rest/resources/2024_01/fulfillment_service.rb +134 -0
  584. data/lib/shopify_api/rest/resources/2024_01/gift_card.rb +222 -0
  585. data/lib/shopify_api/rest/resources/2024_01/gift_card_adjustment.rb +122 -0
  586. data/lib/shopify_api/rest/resources/2024_01/image.rb +161 -0
  587. data/lib/shopify_api/rest/resources/2024_01/inventory_item.rb +112 -0
  588. data/lib/shopify_api/rest/resources/2024_01/inventory_level.rb +183 -0
  589. data/lib/shopify_api/rest/resources/2024_01/location.rb +171 -0
  590. data/lib/shopify_api/rest/resources/2024_01/locations_for_move.rb +60 -0
  591. data/lib/shopify_api/rest/resources/2024_01/marketing_event.rb +213 -0
  592. data/lib/shopify_api/rest/resources/2024_01/metafield.rb +348 -0
  593. data/lib/shopify_api/rest/resources/2024_01/mobile_platform_application.rb +114 -0
  594. data/lib/shopify_api/rest/resources/2024_01/order.rb +489 -0
  595. data/lib/shopify_api/rest/resources/2024_01/order_risk.rb +148 -0
  596. data/lib/shopify_api/rest/resources/2024_01/page.rb +198 -0
  597. data/lib/shopify_api/rest/resources/2024_01/payment.rb +144 -0
  598. data/lib/shopify_api/rest/resources/2024_01/payment_gateway.rb +147 -0
  599. data/lib/shopify_api/rest/resources/2024_01/payment_transaction.rb +114 -0
  600. data/lib/shopify_api/rest/resources/2024_01/payout.rb +101 -0
  601. data/lib/shopify_api/rest/resources/2024_01/policy.rb +73 -0
  602. data/lib/shopify_api/rest/resources/2024_01/price_rule.rb +227 -0
  603. data/lib/shopify_api/rest/resources/2024_01/product.rb +227 -0
  604. data/lib/shopify_api/rest/resources/2024_01/product_listing.rb +200 -0
  605. data/lib/shopify_api/rest/resources/2024_01/product_resource_feedback.rb +92 -0
  606. data/lib/shopify_api/rest/resources/2024_01/province.rb +136 -0
  607. data/lib/shopify_api/rest/resources/2024_01/recurring_application_charge.rb +176 -0
  608. data/lib/shopify_api/rest/resources/2024_01/redirect.rb +143 -0
  609. data/lib/shopify_api/rest/resources/2024_01/refund.rb +155 -0
  610. data/lib/shopify_api/rest/resources/2024_01/report.rb +125 -0
  611. data/lib/shopify_api/rest/resources/2024_01/resource_feedback.rb +77 -0
  612. data/lib/shopify_api/rest/resources/2024_01/script_tag.rb +159 -0
  613. data/lib/shopify_api/rest/resources/2024_01/shipping_zone.rb +87 -0
  614. data/lib/shopify_api/rest/resources/2024_01/shop.rb +222 -0
  615. data/lib/shopify_api/rest/resources/2024_01/smart_collection.rb +220 -0
  616. data/lib/shopify_api/rest/resources/2024_01/storefront_access_token.rb +91 -0
  617. data/lib/shopify_api/rest/resources/2024_01/tender_transaction.rb +97 -0
  618. data/lib/shopify_api/rest/resources/2024_01/theme.rb +127 -0
  619. data/lib/shopify_api/rest/resources/2024_01/transaction.rb +188 -0
  620. data/lib/shopify_api/rest/resources/2024_01/usage_charge.rb +106 -0
  621. data/lib/shopify_api/rest/resources/2024_01/user.rb +142 -0
  622. data/lib/shopify_api/rest/resources/2024_01/variant.rb +212 -0
  623. data/lib/shopify_api/rest/resources/2024_01/webhook.rb +172 -0
  624. data/lib/shopify_api/utils/hmac_validator.rb +1 -1
  625. data/lib/shopify_api/version.rb +1 -1
  626. data/lib/shopify_api/webhooks/registration.rb +19 -4
  627. data/lib/shopify_api/webhooks/registrations/event_bridge.rb +1 -1
  628. data/lib/shopify_api/webhooks/registrations/http.rb +1 -1
  629. data/lib/shopify_api/webhooks/registrations/pub_sub.rb +2 -1
  630. data/lib/shopify_api/webhooks/registry.rb +36 -5
  631. data/shopify_api.gemspec +0 -1
  632. metadata +155 -22
  633. data/.github/workflows/stale.yml +0 -43
  634. data/docs/issues.md +0 -39
  635. data/docs/usage/session_storage.md +0 -46
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 330b033c35e9b3b421a89e937cd50f80cd9439cdfc344c9809ef16746971a6e0
4
- data.tar.gz: 522ce45ee19bc4208b3ee29eb95f620cfc473757507075da9fcb679ba63946a8
3
+ metadata.gz: d837a507476d9d344892dc7667fed5cf1fcc20ac37c5bc5488e4a2583b3dab5c
4
+ data.tar.gz: b385d9e275df49f00fd8aac9bba99c6df69a9f111afd92285e12e2b411d734e5
5
5
  SHA512:
6
- metadata.gz: 884e25968587509d4c7643e128939832613dfc3c335936b517c574b5d4ad2f83e0a7ddb19af55214a04b27a72a4eb9fa1e23e7bf992031120e5c4bb96e67f934
7
- data.tar.gz: b163f2f6290fdf41ca6a5f10c3b4732f1e9f9404d56d560a83db657f70b55f39edc2916660ce0ddf4e24bb8faf4049b6ce55b93dc651ef7fe6f2842483482c2a
6
+ metadata.gz: 0f1de95b3fd22f3f7494914d74647cb51607e5302c3bbf23c7d29e159f1a90f21509d2c7ade5606287dd698ce67e7ec018bf0fa0a099f4034eefdac363d0f20f
7
+ data.tar.gz: 58e4c9c8c67bed4996f056e0219d45c38d589feb2e04e3902302afb71e3f282b2138f85b813d394a953c7c323cfd2f42c71464931fdd7f83327c145921b18d96
data/.github/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @shopify/learn-libs-superteam
1
+ * @Shopify/client-libraries-app-templates
@@ -20,6 +20,10 @@ jobs:
20
20
  uses: ruby/setup-ruby@v1
21
21
  with:
22
22
  ruby-version: ${{ matrix.version }}
23
+ - name: Install OpenSSL
24
+ run: |
25
+ sudo apt-get update
26
+ sudo apt-get install -y libssl-dev
23
27
  - name: Run Bundle Commands
24
28
  run: |
25
29
  bundle config set --with docs
data/.rubocop.yml CHANGED
@@ -57,6 +57,8 @@ Layout/EmptyLineAfterGuardClause:
57
57
  Enabled: true
58
58
  Style/GlobalStdStream:
59
59
  Enabled: true
60
+ Style/OpenStructUse:
61
+ Enabled: false
60
62
  Layout/LineLength:
61
63
  Exclude:
62
64
  - "test/clients/*"
@@ -0,0 +1,231 @@
1
+ # Breaking change notice for version 10.0.0
2
+
3
+ We've rewritten this library for v10, so that it provides all essential features for a Shopify app without depending on the [Active Resource](https://github.com/rails/activeresource) or [graphql-client](https://github.com/github/graphql-client) libraries.
4
+
5
+ #### Table of Contents
6
+ - [New Features](#new-features)
7
+ - [Upgrade Guide](#upgrade-guide)
8
+ - [1. Configuration Changes](#1-configuration-changes)
9
+ - [2. Session Changes](#2-session-changes)
10
+ - [ShopifyAPI::Auth::Session](#shopifyapiauthsession)
11
+ - [3. API Client Changes](#3-api-client-changes)
12
+ - [GraphQL](#graphql)
13
+ - [Rest](#rest)
14
+ - [Using Rest Resources](#using-rest-resources)
15
+ - [Using Rest Admin Client](#using-rest-admin-client)
16
+ - [Generic HTTP Client](#generic-http-client)
17
+ - [Useful References](#useful-references)
18
+
19
+ ## New Features
20
+ Here are the main features version 10 provides:
21
+
22
+ - OAuth support, both with online and offline tokens.
23
+ - Full, transparent support for JWT sessions for embedded apps and cookies for non-embedded ones.
24
+ - Removal of support for 3rd party cookies which are increasingly more difficult to use with modern browsers.
25
+ - Admin API support
26
+ - Auto-generated, version-specific REST resources which are similar to `ActiveResource` (though not identical), that provide methods for all endpoints defined in our [REST API reference](https://shopify.dev/docs/api/admin-rest), as well as direct definition of known attributes.
27
+ - A GraphQL client that doesn't rely on the ActiveResource implementation for REST.
28
+ - Webhook management, with features for adding handlers and registering them with Shopify.
29
+ - Storefront GraphQL API support
30
+
31
+ Please refer to the [Getting Started](docs/getting_started.md) guide in this repository for instructions on how to use each of these components.
32
+
33
+ ### Reasoning
34
+ - Browsers stopped allowing 3rd party cookies, even after jumping through several [ITP](https://webkit.org/tracking-prevention-policy/) hoops, which made the code
35
+ even more more complex and error prone.
36
+ - Session tokens and `authenticatedFetch` were introduced to make it possible for apps to authenticate requests without depending on cookies.
37
+ - The gem was too closely tied to rails on how it sets up sessions (which worked for cookies), so we had to detach the library from rails
38
+ in order to be able to work with both cookies and session tokens.
39
+ - We previously relied on an `omniauth-oauth2` strategy that worked fine when cookies were the only option. But it became increasingly
40
+ awkward when we moved towards session tokens, which meant re-writing the OAuth process in the gem as a whole.
41
+ - Introducing a DB stored session persistence rather than cookie stored.
42
+ - Most feedback we got previously was due to the `ActiveResource` classes failing out of sync with the API because:
43
+ 1. We have some endpoints that didn't 100% follow REST convention;
44
+ 2. We had a single class for each resource and manually maintained custom methods that didn't work across API versions.
45
+
46
+ - To solve the REST problems:
47
+ - We were adding support for auto-generated, version-specific resources for other languages, we decided to add them for Ruby too.
48
+ But those same instances where the API doesn't follow convention would become problematic. Thus we opted for the most explicit option where **every** method was "custom" rather than just some, so that the resources were always consistent.
49
+
50
+ ## Upgrade Guide
51
+ With this, a lot changed in how apps access the library. Here are the updates you should make when migrating to v10:
52
+
53
+ ### 1. Configuration Changes
54
+ #### Removed ShopifyAPI::Base
55
+ `ShopifyAPI::Base` class has been removed. Previous versions of this gem used this class to configure API request setting like:
56
+ - **API request version**
57
+ - **Previously**: Set by `ShopifyAPI::Base.api_version = "xxxx"`
58
+ - **Change**: Configured `api_version` in [ShopifyAPI::Context.setup](#shopifyapicontextsetup)
59
+ - **Set `User-Agent` on API request header**
60
+ - **Previously**: Set by `ShopifyAPI::Base.header["User-Agent"] = "xxxxx"`
61
+ - **Change**: Configured `user_agent_prefix` in [ShopifyAPI::Context.setup](#shopifyapicontextsetup)
62
+ - **Set custom headers on API requests**
63
+ - **Previously**: Set by `ShopifyAPI::Base.header["User-Agent"] = "xxxxx"`
64
+ - **Change**: Custom headers can be added to requests when you use [`ShopifyAPI::Clients::HttpRequest`](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/http_request.rb#L14)
65
+
66
+ #### ShopifyAPI::Context.setup
67
+ Initializing the `ShopifyAPI::Context` with the parameters of your app by calling `ShopifyAPI::Context.setup` (example below) when your app starts (e.g `application.rb` in a Rails app).
68
+ This class holds global configurations for your app and defines how the library behaves.
69
+
70
+ ```ruby
71
+ ShopifyAPI::Context.setup(
72
+ api_key: "<api-key>",
73
+ api_secret_key: "<api-secret-key>",
74
+ host_name: "<application-host-name>",
75
+ scope: "read_orders,read_products,etc",
76
+ is_embedded: true, # Set to true if you are building an embedded app
77
+ is_private: false, # Set to true if you are building a private app
78
+ api_version: "2021-01" # The version of the API you would like to use
79
+ user_agent_prefix: "<user_agent_prefix>" # Set a custom prefix for "User-Agent" header when making API requests
80
+ ###
81
+ )
82
+ ```
83
+
84
+ See other fields accepted during `ShopifyAPI::Context` setup in [context.rb](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/context.rb).
85
+
86
+ ### 2. Session Changes
87
+ `ShopifyAPI::Base` class has been removed, you can no longer activate session using `ShopifyAPI::Base.activate_session`. Instead, you can use
88
+ `ShopifyAPI::Context.activate_session` to set the active session ([`ShopifyAPI::Auth::Session`](#shopifyapiauthsesion)).
89
+ If you're using the [ShopifyApp](https://github.com/Shopify/shopify_app) gem in a Rails app, you don't have to manually set the active session if you use the included `ActiveSupport` concerns. See [Session Docs](https://github.com/Shopify/shopify_app/blob/main/docs/shopify_app/sessions.md) from ShopifyApp gem.
90
+
91
+ You can also manually specify the session to use without setting the active session by passing in the session object ([`ShopifyAPI::Auth::Session`](#shopifyapiauthsesion)) when instantiating new `ShopifyAPI::Clients` objects.
92
+ If session is `nil`, it'll default to use active session from `ShopifyAPI::Context.active_session`.
93
+
94
+ ```ruby
95
+ # Manually specifying a session (ShopifyAPI::Auth::Session) in API clients.
96
+
97
+ # GraphQL Client
98
+ graphql_client = ShopifyAPI::Clients::Graphql::Admin.new(session: session)
99
+
100
+ # REST Client
101
+ rest_client = ShopifyAPI::Clients::Rest::Admin.new(session: session)
102
+
103
+ # Using REST Resources
104
+ rest_resource = ShopifyAPI::Shop.new(session: session)
105
+ ```
106
+
107
+ ##### ShopifyAPI::Auth::Session
108
+ If you're building a Rails app, it is highly recommended for you to use the [`ShopifyApp` gem to perform OAuth and session storage](https://github.com/Shopify/shopify_app/blob/main/docs/shopify_app/sessions.md).
109
+
110
+ If you're not using Rails, please see the [Performing OAuth](./docs/usage/oauth.md) guide on how to perform OAuth to retrieve and store sessions.
111
+
112
+ ### 3. API Client Changes
113
+
114
+ #### GraphQL
115
+ - We deprecated the dependency of [graphql-client](https://rubygems.org/gems/graphql-client) gem. You must refactor your existing query and response parsing to use our new GraphQL HTTP Client classes.
116
+ - [Admin API Client](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/graphql/admin.rb)
117
+ - [Storefront API Client](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/graphql/storefront.rb)
118
+ - There is no need to dump the schema to a local JSON file before using it anymore.
119
+ - The api version used to be set on `ShopifyAPI::Base.api_version`, however that's now deprecated.
120
+ You may specify a specific version when initializing your client, or it'll infer to `ShopifyAPI::Context.api_version` as default.
121
+
122
+ ⚠️ See other Admin API usage in ["Make a GraphQL API call" documentation](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/graphql.md).
123
+
124
+ ⚠️ See Storefront API client usage in ["Make a Storefront API call" documentation](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/graphql.md).
125
+
126
+ ###### Example refactor
127
+ ShopifyAPI Client v9
128
+ ```ruby
129
+ ShopifyAPI::Base.api_version = "2023-04"
130
+ client = ShopifyAPI::GraphQL.client
131
+
132
+ SHOP_NAME_QUERY = client.parse <<-'GRAPHQL'
133
+ {
134
+ shop {
135
+ name
136
+ }
137
+ }
138
+ GRAPHQL
139
+
140
+ result = client.query(SHOP_NAME_QUERY)
141
+ shop_name = result.data.shop.name
142
+ ```
143
+
144
+ ShopifyAPI Client v10+
145
+ ```ruby
146
+ client = ShopifyAPI::Clients::Graphql::Admin.new(session: session, api_version: "2023-04")
147
+ # session must be an instance of ShopifyAPI::Auth::Session, see Section - [2. Session Changes]
148
+
149
+ SHOP_NAME_QUERY =<<~QUERY
150
+ {
151
+ shop {
152
+ name
153
+ }
154
+ }
155
+ QUERY
156
+
157
+ response = client.query(query: query)
158
+ shop_name = response.body["data"]["shop"]["name"]
159
+ ```
160
+
161
+ #### REST
162
+ ##### Using REST Resources
163
+ - The use of `ActiveResource` has been deprecated, REST API requests must now be refactored to use the new format that better represents our REST API schema.
164
+ - Previously the api_version is specified in `ShopifyAPI::Base.api_version`, that has been deprecated. It's now configured in [`ShopifyAPI::Context.setup`](#shopifyapicontextsetup).
165
+
166
+ ###### Example refactor
167
+ ⚠️ You can find detailed examples on how each of the resource endpoints work in our [REST reference documentation](https://shopify.dev/docs/api/admin-rest).
168
+
169
+ Please see below a (non-exhaustive) list of common replacements to guide you in your updates, using the `Order` resource as an example.
170
+ For more detail, see [`order` reference documentation's](https://shopify.dev/docs/api/admin-rest/2023-07/resources/order#top) ruby example.
171
+
172
+ |Usage | Before| After |
173
+ | -----| --- | --- |
174
+ |Find partially paid orders| `Order.find(:all, params: {financial_status: "partially_paid"})`| `Order.all(financial_status: "partially_paid")` |
175
+ |Find order by ID `<id>` | `Order.find(<id>)` | `Order.find(id: <id>)` |
176
+ |Update an order's fulfillment status|`order = Order.find<id>`<br/>`order.fulfillment_status = "fulfilled"`<br/>`order.note = "Fulfilled on September 6, 2023"`<br/>`order.save`|`order = Order.find(id: <id>)`<br/>`order.fulfillment_status = "fulfilled"`<br/>`order.note = "Fulfilled on September 6, 2023"`<br/>`order.save!`|
177
+ |Close an order| `order = Order.new(<id>)`<br/>`order.post(:close)` | `order = Order.find(id: <id>)`<br/>`order.close` |
178
+ |Delete an order| `order = Order.new(<id>)`<br/>`order.delete` | `Order.delete(id: <id>)` |
179
+
180
+ ###### Note on resource connections
181
+ Previously we added helper methods to load related resource connections like [`orders.transactions`](https://github.com/Shopify/shopify-api-ruby/blob/97eec35fb76afbce1d948cee2963791457e934da/lib/shopify_api/resources/order.rb#L20).
182
+ After the upgrade, only connected properties listed in the REST API will be supported.
183
+
184
+ For example:
185
+ - `order.transactions` is not supported because `transactions` is not a property of the `Order` resource.
186
+ - `order.customer` is supported because `customer` is a property of the `Order` resource.
187
+
188
+ [See the full list of `Order` properties here.](https://shopify.dev/docs/api/admin-rest/2023-07/resources/order#resource-object)
189
+
190
+ ##### Using REST Admin Client
191
+ If you do not want to use the REST resource classes, you can use our REST Admin client directly to make HTTP requests.
192
+
193
+ ⚠️ See other REST client usage in ["Make a REST API call" documentation](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/rest.md).
194
+
195
+ Example:
196
+ ```ruby
197
+ # Create a new client.
198
+ client = ShopifyAPI::Clients::Rest::Admin.new(session: session)
199
+
200
+ # Update title for product with ID <id>
201
+ body = {
202
+ product: {
203
+ title: "My cool product"
204
+ }
205
+ }
206
+
207
+ # Use `client.put` to send your request to the specified Shopify Admin REST API endpoint.
208
+ client.put(path: "products/<id>.json", body: body)
209
+ ```
210
+
211
+ #### Generic HTTP Client
212
+ We added a new generic [HttpClient](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/http_client.rb) wrapper to make requests and handle Shopify specific errors. All of the REST and GraphQL Clients use this HTTP Client in its foundation.
213
+ You can use this to make direct HTTP API calls easily.
214
+ See how the GraphQL Client makes a request with this HttpClient class in its [implementation here](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/graphql/client.rb#L33-L45).
215
+
216
+ ## Useful references
217
+
218
+ ShopifyAPI:
219
+ - [Performing OAuth](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/oauth.md)
220
+ - [Make a GraphQL API Call](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/graphql.md)
221
+ - [Make a Storefront API Call (GraphQL)](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/graphql_storefront.md)
222
+ - [Make a REST API Call](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/rest.md)
223
+ - [Webhooks](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/webhooks.md)
224
+
225
+ ShopifyApp Gem (Rails):
226
+ - [Authentication](https://github.com/Shopify/shopify_app/blob/main/docs/shopify_app/authentication.md)
227
+ - [Sessions](https://github.com/Shopify/shopify_app/blob/main/docs/shopify_app/sessions.md)
228
+
229
+ Shopify API:
230
+ - [Admin GraphQL Reference](https://shopify.dev/docs/api/admin-graphql)
231
+ - [Admin REST Reference](https://shopify.dev/docs/api/admin-rest)
data/CHANGELOG.md CHANGED
@@ -4,6 +4,30 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 13.4.0
8
+ - [#1210](https://github.com/Shopify/shopify-api-ruby/pull/1246) Add context option `response_as_struct` to allow GraphQL API responses to be accessed via dot notation.
9
+ - [#1257](https://github.com/Shopify/shopify-api-ruby/pull/1257) Add `api_call_limit` and `retry_request_after` to REST resources to expose rate limit information.
10
+ - [#1257](https://github.com/Shopify/shopify-api-ruby/pull/1257) Added support for the 2024-01 API version. This also includes a fix for the `for_hash` option when creating resources.
11
+
12
+ ## 13.3.1
13
+
14
+ - [#1244](https://github.com/Shopify/shopify-api-ruby/pull/1244) Add `expired?` to `ShopifyAPI::Auth::Session` to check if the session is expired (mainly for user sessions)
15
+ - [#1249](https://github.com/Shopify/shopify-api-ruby/pull/1249) Fix bug where mandatory webhooks could not be processed
16
+ - [#1250](https://github.com/Shopify/shopify-api-ruby/pull/1250) Remove rails methods .empty? .present? that were breaking CI
17
+
18
+ ## 13.3.0
19
+
20
+ - [#1241](https://github.com/Shopify/shopify-api-ruby/pull/1241) Add `api_host` to `ShopifyAPI::Context.setup`, allowing the API host to be overridden in `ShopifyAPI::Clients::HttpClient`. This context option is intended for internal Shopify use only.
21
+ - [#1237](https://github.com/Shopify/shopify-api-ruby/pull/1237) Skip mandatory webhook topic registration/unregistrations
22
+ - [#1239](https://github.com/Shopify/shopify-api-ruby/pull/1239) Update `OAuth.validate_auth_callback` to use `ShopifyApi::Clients::HttpClient`.
23
+
24
+ ## 13.2.0
25
+
26
+ - [#1183](https://github.com/Shopify/shopify-api-ruby/pull/1189) Added string array support for fields parameter in Webhook::Registry
27
+ - [1208](https://github.com/Shopify/shopify-api-ruby/pull/1208) Fix CustomerAddress and FulfillmentRequest methods
28
+ - [1225](https://github.com/Shopify/shopify-api-ruby/pull/1225) Support for 2023_10 API version
29
+ - [#1186](https://github.com/Shopify/shopify-api-ruby/pull/1186) Extend webhook registration to support metafield_namespaces
30
+
7
31
  ## 13.1.0
8
32
 
9
33
  - [#1183](https://github.com/Shopify/shopify-api-ruby/pull/1183) Added support for API version 2023-07
@@ -14,7 +38,7 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api
14
38
 
15
39
  - [#1140](https://github.com/Shopify/shopify-api-ruby/pull/1140) ⚠️ [Breaking] Reformat Http error messages to be JSON parsable.
16
40
  - [#1142](https://github.com/Shopify/shopify-api-ruby/issues/1142) Restore API version 2022-04, in alignment with [this](https://shopify.dev/changelog/action-required-support-for-api-version-2022-04-extended-to-june-30-2023) changelog notice.
17
- - [#1155](https://github.com/Shopify/shopify-api-ruby/pull/1155) ⚠️ [Breaking] Remove session storage that was deprecated with [#1055](https://github.com/Shopify/shopify-api-ruby/pull/1055). ⚠️ [Breaking] GraphQL Proxy now requires `session` to be passed as an argument.
41
+ - [#1155](https://github.com/Shopify/shopify-api-ruby/pull/1155) ⚠️ [Breaking] Remove session storage that was deprecated with [#1055](https://github.com/Shopify/shopify-api-ruby/pull/1055). To upgrade, remove `session_storage` from your API context block. ⚠️ [Breaking] GraphQL Proxy now requires `session` to be passed as an argument.
18
42
  - [#1150](https://github.com/Shopify/shopify-api-ruby/pull/1150) [Patch] Add support for Event topic names.
19
43
 
20
44
  ## 12.5.0
data/CONTRIBUTING.md CHANGED
@@ -1,9 +1,34 @@
1
1
 
2
2
  Submitting Issues
3
3
  -----------------
4
+ Submitting Issues
4
5
 
5
6
  Please open an issue here if you encounter a specific bug with this API client library or if something is documented here https://shopify.dev/docs/apps but is missing from this package.
6
7
 
7
8
  General questions about the Shopify API and usage of this package (not necessarily a bug) should be posted on the [Shopify forums](https://community.shopify.com/c/partners-and-developers/ct-p/appdev).
8
9
 
9
10
  When in doubt, post on the forum first. You'll likely have your questions answered more quickly if you post there; more people monitor the forum than Github.
11
+
12
+ In order for us to best triage the issue, please include steps to reproduce the issue as well as the impacted feature.
13
+
14
+ ## Roadmap
15
+
16
+ The focus of development efforts by maintainers of this project a roadmap will be proposed via PR and accessible at any point in the ROADMAP.md file.
17
+
18
+ Working with a pull request modify the [ROADMAP.md](https://github.com/Shopify/shopify-api-ruby/blob/aa0b7f9a5a9095ca11f3f93f9aecc72e8daa6bce/ROADMAP.md) allows us to invite community feedback on the direction while not adding another communication avenue. While there are certainly better tools for the job than a markdown file for this, we are aiming to keep a minimal toolset to help us better manage the communication channels that we have open.
19
+
20
+ If there are concerns with the direction and priorities of the maintainers, this roadmap PR is the appropriate place to share your concerns.
21
+
22
+ ## Submitting Pull Requests
23
+
24
+ We welcome pull requests and help from the community! PRs fixing bugs will take priority to triaging proposed net new functionality. If you do want to add a feature, we recommend opening an issue first exploring the appetite of the community / maintainers to ensure there is alignment on direction before you spend time on the PR.
25
+
26
+ ## Gem Architecture
27
+ Understanding how all the components of the Shopify App development stack work together will help best understand what level of abstraction a feature is meant to be applied. Please consider this architecture before introducing new functionally to ensure it is in the right place:
28
+
29
+ | Gem Name | Job |
30
+ |---|---|
31
+ | Shopify API (this gem) | Obtain a session, clients for APIs (REST, GraphQL), error handling, webhook management |
32
+ | REST Resources | Interfaces to the APIs. Response casting into defined objects with attributes/methods |
33
+ | Shopify App | Build Shopify app using Rails conventions. Oauth, webhook processing, persistence, etc |
34
+ | App Template | Template demonstrating how to use all these components in one starting boilerplate application |
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify_api (13.1.0)
4
+ shopify_api (13.4.0)
5
5
  activesupport
6
6
  concurrent-ruby
7
7
  hash_diff
@@ -16,20 +16,30 @@ PATH
16
16
  GEM
17
17
  remote: https://rubygems.org/
18
18
  specs:
19
- activesupport (7.0.6)
19
+ activesupport (7.1.2)
20
+ base64
21
+ bigdecimal
20
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
23
+ connection_pool (>= 2.2.5)
24
+ drb
21
25
  i18n (>= 1.6, < 2)
22
26
  minitest (>= 5.1)
27
+ mutex_m
23
28
  tzinfo (~> 2.0)
24
29
  addressable (2.8.0)
25
30
  public_suffix (>= 2.0.2, < 5.0)
26
31
  ast (2.4.2)
32
+ base64 (0.2.0)
33
+ bigdecimal (3.1.5)
27
34
  byebug (11.1.3)
28
35
  coderay (1.1.3)
29
36
  concurrent-ruby (1.2.2)
37
+ connection_pool (2.4.1)
30
38
  crack (0.4.5)
31
39
  rexml
32
40
  diff-lcs (1.5.0)
41
+ drb (2.2.0)
42
+ ruby2_keywords
33
43
  fakefs (1.4.1)
34
44
  hash_diff (1.1.1)
35
45
  hashdiff (1.0.1)
@@ -40,19 +50,20 @@ GEM
40
50
  concurrent-ruby (~> 1.0)
41
51
  json (2.6.2)
42
52
  jwt (2.7.1)
43
- language_server-protocol (3.17.0.1)
44
53
  method_source (1.0.0)
45
- mini_mime (1.1.2)
54
+ mini_mime (1.1.5)
46
55
  minitest (5.15.0)
47
56
  mocha (1.13.0)
48
57
  multi_xml (0.6.0)
58
+ mutex_m (0.2.0)
49
59
  netrc (0.11.0)
50
- oj (3.15.0)
51
- openssl (3.1.0)
60
+ oj (3.16.3)
61
+ bigdecimal (>= 3.0)
62
+ openssl (3.2.0)
52
63
  parallel (1.22.1)
53
- parser (3.1.2.1)
64
+ parser (3.2.2.4)
54
65
  ast (~> 2.4.1)
55
- prettier_print (0.1.0)
66
+ racc
56
67
  pry (0.14.1)
57
68
  coderay (~> 1.1)
58
69
  method_source (~> 1.0)
@@ -60,6 +71,7 @@ GEM
60
71
  byebug (~> 11.0)
61
72
  pry (>= 0.13, < 0.15)
62
73
  public_suffix (4.0.6)
74
+ racc (1.7.1)
63
75
  rainbow (3.1.1)
64
76
  rake (13.0.6)
65
77
  rbi (0.0.15)
@@ -85,12 +97,9 @@ GEM
85
97
  rubocop (~> 1.35)
86
98
  rubocop-sorbet (0.6.11)
87
99
  rubocop (>= 0.90.0)
88
- ruby-lsp (0.3.2)
89
- language_server-protocol (~> 3.17.0)
90
- sorbet-runtime
91
- syntax_tree (>= 3.4)
92
100
  ruby-progressbar (1.11.0)
93
- securerandom (0.2.2)
101
+ ruby2_keywords (0.0.5)
102
+ securerandom (0.3.1)
94
103
  sorbet (0.5.10438)
95
104
  sorbet-static (= 0.5.10438)
96
105
  sorbet-runtime (0.5.10438)
@@ -104,8 +113,6 @@ GEM
104
113
  sorbet (>= 0.5.9204)
105
114
  sorbet-runtime (>= 0.5.9204)
106
115
  thor (>= 0.19.2)
107
- syntax_tree (3.6.1)
108
- prettier_print
109
116
  tapioca (0.10.2)
110
117
  bundler (>= 1.17.3)
111
118
  netrc (>= 0.11.0)
@@ -133,7 +140,7 @@ GEM
133
140
  yard-sorbet (0.7.0)
134
141
  sorbet-runtime (>= 0.5)
135
142
  yard (>= 0.9)
136
- zeitwerk (2.6.8)
143
+ zeitwerk (2.6.12)
137
144
 
138
145
  PLATFORMS
139
146
  arm64-darwin-21
@@ -149,7 +156,6 @@ DEPENDENCIES
149
156
  rubocop
150
157
  rubocop-shopify
151
158
  rubocop-sorbet
152
- ruby-lsp
153
159
  shopify_api!
154
160
  sorbet
155
161
  tapioca
data/README.md CHANGED
@@ -17,6 +17,9 @@ You can use this library in any application that has a Ruby backend, since it do
17
17
 
18
18
  **Note**: These instructions apply to v10 or later of this package. If you're running v9 in your app, you can find the documentation [in this branch](https://github.com/Shopify/shopify-api-ruby/tree/v9).
19
19
 
20
+ ## Use with Rails
21
+ If using in the Rails framework, we highly recommend you use the [shopify_app](https://github.com/Shopify/shopify_app) gem to interact with this gem. Authentication, session storage, webhook registration, and other frequently implemented paths are managed in that gem with easy to use configurations.
22
+
20
23
  ## Requirements
21
24
 
22
25
  To follow these usage guides, you will need to:
@@ -67,46 +70,19 @@ The Shopify API gem tries to make this easy by providing functions to begin and
67
70
 
68
71
  If you intend to use webhooks in your application follow the steps in the [Webhooks doc](docs/usage/webhooks.md) for instructions on registering and handling webhooks.
69
72
 
70
- ### Start Making Authenticated Shopify Requests
73
+ ### Start Making Authenticated Shopify API Requests
71
74
 
72
- Once your app can perform OAuth, it can now make authenticated Shopify API calls using the Admin [REST](docs/usage/rest.md) or [GraphQL](docs/usage/graphql.md) Clients, or the [Storefront API GraphQL Client](docs/usage/graphql_storefront.md).
75
+ Once your app can perform OAuth, it can now make authenticated Shopify API calls, see docs for:
76
+ * Making [Admin REST API](docs/usage/rest.md) requests
77
+ * Making [Admin GraphQL API](docs/usage/graphql.md) requests
78
+ * Making [Storefront GraphQL API](docs/usage/graphql_storefront.md) requests
73
79
 
74
80
  ## Breaking Change Notices
75
81
 
76
82
  ### Breaking change notice for version 10.0.0
83
+ See [BREAKING_CHANGES_FOR_V10](BREAKING_CHANGES_FOR_V10.md)
77
84
 
78
- We've rewritten this library for v10, so that it provides all essential features for a Shopify app without depending on the [Active Resource](https://github.com/rails/activeresource) or [graphql-client](https://github.com/github/graphql-client) libraries.
79
-
80
- Here are the main features it provides:
81
-
82
- - OAuth support, both with online and offline tokens.
83
- - Full, transparent support for JWT sessions for embedded apps and cookies for non-embedded ones.
84
- - Removal of support for 3rd party cookies which are increasingly more difficult to use with modern browsers.
85
- - Admin API support
86
- - Auto-generated, version-specific REST resources which are similar to `ActiveResource` (though not identical), that provide methods for all endpoints defined in our [REST API reference](https://shopify.dev/docs/api/admin-rest), as well as direct definition of known attributes.
87
- - A GraphQL client that doesn't rely on the ActiveResource implementation for REST.
88
- - Webhook management, with features for adding handlers and registering them with Shopify.
89
- - Storefront GraphQL API support
90
-
91
- Please refer to [the documentation](docs/getting_started.md) in this repository for instructions on how to use each of these components.
92
-
93
- With this, a lot changed in how apps access the library. Here are the updates you should make when migrating to v10:
94
-
95
- - Call `ShopifyAPI::Context.setup` when setting up your app. This class holds global configurations for your app and defines how the library behaves.
96
- - If not using the `shopify_app` gem, your app needs to provide an implementation of `ShopifyAPI::Auth::SessionStorage` for production. Read more about this [in our documentation](docs/usage/session_storage.md).
97
- - To change the `User-Agent` header, use `user_agent_prefix` in `ShopifyAPI::Context.setup`.
98
- - Usages of the `ActiveResource` classes for REST API requests need to be refactored into the new format. You can find detailed examples on how each of the endpoints work in our [reference documentation](https://shopify.dev/docs/api/admin-rest).
99
-
100
- Please see below a (non-exhaustive) list of common replacements to guide you in your updates, using the `Order` resource as an example.
101
-
102
- | Before | After |
103
- | --- | --- |
104
- | `Order.find(:all, params: {param1: value1})` | `Order.all(param1: value1)` |
105
- | `Order.find(<id>)` | `Order.find(id: <id>)` |
106
- | `order = Order.new(<id>)`<br/>`order.post(:close)` | `order = Order.new`<br/>`order.close` |
107
- | `order = Order.new(<id>)`<br/>`order.delete` | `Order.delete(id: <id>)` |
108
-
109
- ## Breaking changes for older versions
85
+ ### Breaking changes for older versions
110
86
 
111
87
  See [BREAKING_CHANGES_FOR_OLDER_VERSIONS](BREAKING_CHANGES_FOR_OLDER_VERSIONS.md)
112
88
 
data/ROADMAP.md ADDED
@@ -0,0 +1,10 @@
1
+ # Roadmap
2
+
3
+ |Priority|Description|Delivery Time frame|
4
+ |---|---|---|
5
+ |P0|Respond timely to open issues/Pull Requests|Ongoing|
6
+ |P1|Minor API release with support for 10-23 API version|Oct 6 - 13|
7
+ |P2|Restore dot notation access to GraphQL responses|Oct 26 - Dec 7|
8
+ |P2|Restrospection GQL queries to define types for GQL resources|October 26- Dec 7|
9
+ |P2|New token exchange authentication via optional feature flag|October 26- Dec 7|
10
+ |P3|[Extract REST resources into their own gem](https://github.com/Shopify/shopify-api-ruby/issues/1194)|Oct 26 - Dec 7|
data/docs/README.md CHANGED
@@ -10,4 +10,3 @@ You can follow our getting started guide to learn how to use this library.
10
10
  - [Make a GraphQL API call](usage/graphql.md)
11
11
  - [Make a Storefront API call](usage/graphql_storefront.md)
12
12
  - [Webhooks](usage/webhooks.md)
13
- - [Known issues and caveats](issues.md)
@@ -37,10 +37,27 @@ ShopifyAPI::Context.setup(
37
37
  Next, unless you are making a private app, you need to go through OAuth as described [here](https://shopify.dev/docs/apps/auth/oauth) to create sessions for shops using your app.
38
38
  The Shopify API gem tries to make this easy by providing functions to begin and complete the OAuth process. See the [Oauth doc](usage/oauth.md) for instructions on how to use these.
39
39
 
40
- ### Register Webhooks and a Webhook Handler
40
+ ### Sessions
41
41
 
42
- If you intend to use webhooks in your application follow the steps in the [Webhooks doc](usage/webhooks.md) for instructions on registering and handling webhooks.
42
+ Sessions are required to make requests with the REST or GraphQL clients. This Library provides helpers for creating sessions via OAuth. Helpers are provided to retrieve session ID from a HTTP request from an embedded Shopify app or cookies from non-embedded apps.
43
+
44
+ Session persistence is handled by the [ShopifyApp](https://github.com/Shopify/shopify_app) gem and is recommended for use in the Rails context. See that gem for documentation on how to use it.
45
+
46
+ #### Cookie
47
+ Cookie based authentication is not supported for embedded apps due to browsers dropping support for third party cookies due to security concerns. Non-embedded apps are able to use cookies for session storage/retrieval.
48
+
49
+ For *non-embedded* apps, you can pass the cookies into `ShopifyAPI::Utils::SessionUtils.current_session_id(nil, cookies, true)` for online (user) sessions or `ShopifyAPI::Utils::SessionUtils.current_session_id(nil, cookies, false)` for offline (store) sessions.
50
+
51
+ #### Getting Session ID From Embedded Requests
52
+ For *embedded* apps, you can pass the auth header into `ShopifyAPI::Utils::SessionUtils.current_session_id(auth_header, nil, true)` for online (user) sessions or `ShopifyAPI::Utils::SessionUtils.current_session_id(auth_header, nil, false)` for offline (store) sessions. This function needs an `auth_header` which is the `HTTP_AUTHORIZATION` header.
43
53
 
44
- ### Start Making Authenticated Shopify Requests
54
+ If your app uses client side rendering instead of server side rendering, you will need to use App Bridge's [authenticatedFetch](https://shopify.dev/docs/apps/auth/oauth/session-tokens/getting-started) to make authenticated API requests from the client.
55
+
56
+ #### Start Making Authenticated Shopify Requests
45
57
 
46
58
  You can now start making authenticated Shopify API calls using the Admin [REST](usage/rest.md) or [GraphQL](usage/graphql.md) Clients or the [Storefront GraphQL Client](usage/graphql_storefront.md).
59
+
60
+ ### Register Webhooks and a Webhook Handler
61
+
62
+ If you intend to use webhooks in your application follow the steps in the [Webhooks doc](usage/webhooks.md) for instructions on registering and handling webhooks.
63
+
@@ -0,0 +1,75 @@
1
+ # Custom Apps
2
+
3
+ If you have followed instructions on creating [custom apps](https://help.shopify.com/current/manual/apps/app-types/custom-apps), you should be able to access your API token without having to go through the OAuth flow.
4
+
5
+ You can follow instructions for [initializing the session object](#initializing-the-session-object) to construct the session object to be used in authenticated API calls to your store. There are 2 methods to use the session object to make API calls:
6
+ 1. [Passing `session` object into each client request](#passing-session-object-into-each-client-request)
7
+ 2. [Setting `active_session` in `ShopifyAPI::Context`](#setting-active-session-in-shopifyapicontext)
8
+
9
+ ## Initializing the Session object
10
+ Following is a basic example to construct a simple Session object. You can see full list of parameters for this object in the [class definition](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/auth/session.rb)
11
+ ```ruby
12
+ session = ShopifyAPI::Auth::Session.new(
13
+ shop: "#{your_shop_name}.myshopify.com"
14
+ access_token: "the_token_for_your_custom_app_found_in_admin"
15
+ )
16
+
17
+ ```
18
+ ## Using `Session` to make API calls
19
+
20
+ ### Passing `session` object into each client request
21
+ Example:
22
+ ```ruby
23
+ def make_api_request(shop)
24
+ # 1. create session object
25
+ session = ShopifyAPI::Auth::Session.new(
26
+ shop: "#{your_shop_name}.myshopify.com"
27
+ access_token: "the_token_for_your_custom_app_found_in_admin"
28
+ )
29
+
30
+ # 2a. Create API client with the session information
31
+ # session must be type `ShopifyAPI::Auth::Session`
32
+ graphql_client = ShopifyAPI::Clients::Graphql::Admin.new(session: session)
33
+ response = graphql_client.query(query: MY_API_QUERY)
34
+
35
+ # 2b. REST example
36
+ product_count = ShopifyAPI::Product.count(session: session)
37
+
38
+ ...
39
+ end
40
+ ```
41
+
42
+ ### Setting `active_session` in `ShopifyAPI::Context`
43
+ Alternatively, if you don't want to keep having to create/retrieve a Session object for a shop, you may set [`ShopifyAPI::Context.active_session`](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/context.rb#L144).
44
+ All of the API client classes will [use the `active_session`](https://github.com/Shopify/shopify-api-ruby/blob/c3bb9d8f8b6053756149a4cf9299e059ec337544/lib/shopify_api/clients/http_client.rb#L13) if the `session` passed in is `nil`.
45
+
46
+ Example:
47
+ ```ruby
48
+ #### Configuration
49
+ def configure_app
50
+ # This method is called before making authenticated API calls
51
+ session = ShopifyAPI::Auth::Session.new(
52
+ shop: "#{your_shop_name}.myshopify.com"
53
+ access_token: "the_token_for_your_custom_app_found_in_admin"
54
+ )
55
+
56
+ # Activate session to be used in all API calls
57
+ # session must be type `ShopifyAPI::Auth::Session`
58
+ ShopifyAPI::Context.activate_session(session)
59
+ end
60
+
61
+ #### Using clients to make authenticated API calls
62
+ def make_api_request
63
+ # 1. Create API client without session information
64
+ # The graphql_client will use `ShopifyAPI::Context.active_session` when making API calls
65
+ graphql_client = ShopifyAPI::Clients::Graphql::Admin.new
66
+
67
+ # 2. Use API client to make queries
68
+ ...
69
+ end
70
+
71
+ ```
72
+
73
+ ⚠️ See following docs on how to use the API clients:
74
+ - [Make a GraphQL API call](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/graphql.md)
75
+ - [Make a REST API call](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/rest.md)