square.rb 43.0.1.20250716 → 44.0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1762) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -10
  3. data/README.md +158 -139
  4. data/lib/square/apple_pay/client.rb +43 -0
  5. data/lib/square/apple_pay/types/register_domain_request.rb +11 -0
  6. data/lib/square/bank_accounts/client.rb +69 -0
  7. data/lib/square/bank_accounts/types/get_bank_accounts_request.rb +11 -0
  8. data/lib/square/bank_accounts/types/get_by_v_1_id_bank_accounts_request.rb +11 -0
  9. data/lib/square/bank_accounts/types/list_bank_accounts_request.rb +13 -0
  10. data/lib/square/bookings/client.rb +255 -0
  11. data/lib/square/bookings/custom_attribute_definitions/client.rb +137 -0
  12. data/lib/square/bookings/custom_attribute_definitions/types/create_booking_custom_attribute_definition_request.rb +16 -0
  13. data/lib/square/bookings/custom_attribute_definitions/types/delete_custom_attribute_definitions_request.rb +13 -0
  14. data/lib/square/bookings/custom_attribute_definitions/types/get_custom_attribute_definitions_request.rb +14 -0
  15. data/lib/square/bookings/custom_attribute_definitions/types/list_custom_attribute_definitions_request.rb +14 -0
  16. data/lib/square/bookings/custom_attribute_definitions/types/update_booking_custom_attribute_definition_request.rb +17 -0
  17. data/lib/square/bookings/custom_attributes/client.rb +161 -0
  18. data/lib/square/bookings/custom_attributes/types/bulk_delete_booking_custom_attributes_request.rb +15 -0
  19. data/lib/square/bookings/custom_attributes/types/bulk_upsert_booking_custom_attributes_request.rb +15 -0
  20. data/lib/square/bookings/custom_attributes/types/delete_custom_attributes_request.rb +14 -0
  21. data/lib/square/bookings/custom_attributes/types/get_custom_attributes_request.rb +16 -0
  22. data/lib/square/bookings/custom_attributes/types/list_custom_attributes_request.rb +16 -0
  23. data/lib/square/bookings/custom_attributes/types/upsert_booking_custom_attribute_request.rb +16 -0
  24. data/lib/square/bookings/location_profiles/client.rb +36 -0
  25. data/lib/square/bookings/location_profiles/types/list_location_profiles_request.rb +14 -0
  26. data/lib/square/bookings/team_member_profiles/client.rb +53 -0
  27. data/lib/square/bookings/team_member_profiles/types/get_team_member_profiles_request.rb +13 -0
  28. data/lib/square/bookings/team_member_profiles/types/list_team_member_profiles_request.rb +16 -0
  29. data/lib/square/bookings/types/bulk_retrieve_bookings_request.rb +11 -0
  30. data/lib/square/bookings/types/bulk_retrieve_team_member_booking_profiles_request.rb +11 -0
  31. data/lib/square/bookings/types/cancel_booking_request.rb +13 -0
  32. data/lib/square/bookings/types/create_booking_request.rb +12 -0
  33. data/lib/square/bookings/types/get_bookings_request.rb +11 -0
  34. data/lib/square/bookings/types/list_bookings_request.rb +17 -0
  35. data/lib/square/bookings/types/retrieve_location_booking_profile_request.rb +11 -0
  36. data/lib/square/bookings/types/search_availability_request.rb +11 -0
  37. data/lib/square/bookings/types/update_booking_request.rb +13 -0
  38. data/lib/square/cards/client.rb +86 -0
  39. data/lib/square/cards/types/create_card_request.rb +14 -0
  40. data/lib/square/cards/types/disable_cards_request.rb +11 -0
  41. data/lib/square/cards/types/get_cards_request.rb +11 -0
  42. data/lib/square/cards/types/list_cards_request.rb +15 -0
  43. data/lib/square/cash_drawers/client.rb +17 -0
  44. data/lib/square/cash_drawers/shifts/client.rb +82 -0
  45. data/lib/square/cash_drawers/shifts/types/get_shifts_request.rb +14 -0
  46. data/lib/square/cash_drawers/shifts/types/list_events_shifts_request.rb +16 -0
  47. data/lib/square/cash_drawers/shifts/types/list_shifts_request.rb +18 -0
  48. data/lib/square/catalog/client.rb +247 -0
  49. data/lib/square/catalog/images/client.rb +78 -0
  50. data/lib/square/catalog/images/types/create_images_request.rb +11 -0
  51. data/lib/square/catalog/images/types/update_images_request.rb +13 -0
  52. data/lib/square/catalog/object/client.rb +90 -0
  53. data/lib/square/catalog/object/types/delete_object_request.rb +13 -0
  54. data/lib/square/catalog/object/types/get_object_request.rb +16 -0
  55. data/lib/square/catalog/object/types/upsert_catalog_object_request.rb +14 -0
  56. data/lib/square/catalog/types/batch_delete_catalog_objects_request.rb +11 -0
  57. data/lib/square/catalog/types/batch_get_catalog_objects_request.rb +15 -0
  58. data/lib/square/catalog/types/batch_upsert_catalog_objects_request.rb +14 -0
  59. data/lib/square/catalog/types/list_catalog_request.rb +13 -0
  60. data/lib/square/catalog/types/search_catalog_items_request.rb +26 -0
  61. data/lib/square/catalog/types/search_catalog_objects_request.rb +20 -0
  62. data/lib/square/catalog/types/update_item_modifier_lists_request.rb +13 -0
  63. data/lib/square/catalog/types/update_item_taxes_request.rb +13 -0
  64. data/lib/square/checkout/client.rb +89 -0
  65. data/lib/square/checkout/payment_links/client.rb +110 -0
  66. data/lib/square/checkout/payment_links/types/create_payment_link_request.rb +19 -0
  67. data/lib/square/checkout/payment_links/types/delete_payment_links_request.rb +13 -0
  68. data/lib/square/checkout/payment_links/types/get_payment_links_request.rb +13 -0
  69. data/lib/square/checkout/payment_links/types/list_payment_links_request.rb +14 -0
  70. data/lib/square/checkout/payment_links/types/update_payment_link_request.rb +14 -0
  71. data/lib/square/checkout/types/retrieve_location_settings_request.rb +11 -0
  72. data/lib/square/checkout/types/update_location_settings_request.rb +12 -0
  73. data/lib/square/checkout/types/update_merchant_settings_request.rb +11 -0
  74. data/lib/square/client.rb +92 -231
  75. data/lib/square/customers/cards/client.rb +55 -0
  76. data/lib/square/customers/cards/types/create_customer_card_request.rb +17 -0
  77. data/lib/square/customers/cards/types/delete_cards_request.rb +14 -0
  78. data/lib/square/customers/client.rb +268 -0
  79. data/lib/square/customers/custom_attribute_definitions/client.rb +174 -0
  80. data/lib/square/customers/custom_attribute_definitions/types/batch_upsert_customer_custom_attributes_request.rb +15 -0
  81. data/lib/square/customers/custom_attribute_definitions/types/create_customer_custom_attribute_definition_request.rb +16 -0
  82. data/lib/square/customers/custom_attribute_definitions/types/delete_custom_attribute_definitions_request.rb +13 -0
  83. data/lib/square/customers/custom_attribute_definitions/types/get_custom_attribute_definitions_request.rb +14 -0
  84. data/lib/square/customers/custom_attribute_definitions/types/list_custom_attribute_definitions_request.rb +14 -0
  85. data/lib/square/customers/custom_attribute_definitions/types/update_customer_custom_attribute_definition_request.rb +17 -0
  86. data/lib/square/customers/custom_attributes/client.rb +121 -0
  87. data/lib/square/customers/custom_attributes/types/delete_custom_attributes_request.rb +14 -0
  88. data/lib/square/customers/custom_attributes/types/get_custom_attributes_request.rb +16 -0
  89. data/lib/square/customers/custom_attributes/types/list_custom_attributes_request.rb +16 -0
  90. data/lib/square/customers/custom_attributes/types/upsert_customer_custom_attribute_request.rb +16 -0
  91. data/lib/square/customers/groups/client.rb +150 -0
  92. data/lib/square/customers/groups/types/add_groups_request.rb +14 -0
  93. data/lib/square/customers/groups/types/create_customer_group_request.rb +14 -0
  94. data/lib/square/customers/groups/types/delete_groups_request.rb +13 -0
  95. data/lib/square/customers/groups/types/get_groups_request.rb +13 -0
  96. data/lib/square/customers/groups/types/list_groups_request.rb +14 -0
  97. data/lib/square/customers/groups/types/remove_groups_request.rb +14 -0
  98. data/lib/square/customers/groups/types/update_customer_group_request.rb +14 -0
  99. data/lib/square/customers/segments/client.rb +53 -0
  100. data/lib/square/customers/segments/types/get_segments_request.rb +13 -0
  101. data/lib/square/customers/segments/types/list_segments_request.rb +14 -0
  102. data/lib/square/customers/types/bulk_create_customers_request.rb +13 -0
  103. data/lib/square/customers/types/bulk_delete_customers_request.rb +11 -0
  104. data/lib/square/customers/types/bulk_retrieve_customers_request.rb +11 -0
  105. data/lib/square/customers/types/bulk_update_customers_request.rb +13 -0
  106. data/lib/square/customers/types/create_customer_request.rb +22 -0
  107. data/lib/square/customers/types/delete_customers_request.rb +12 -0
  108. data/lib/square/customers/types/get_customers_request.rb +11 -0
  109. data/lib/square/customers/types/list_customers_request.rb +15 -0
  110. data/lib/square/customers/types/search_customers_request.rb +14 -0
  111. data/lib/square/customers/types/update_customer_request.rb +23 -0
  112. data/lib/square/devices/client.rb +57 -0
  113. data/lib/square/devices/codes/client.rb +72 -0
  114. data/lib/square/devices/codes/types/create_device_code_request.rb +14 -0
  115. data/lib/square/devices/codes/types/get_codes_request.rb +13 -0
  116. data/lib/square/devices/codes/types/list_codes_request.rb +16 -0
  117. data/lib/square/devices/types/get_devices_request.rb +11 -0
  118. data/lib/square/devices/types/list_devices_request.rb +14 -0
  119. data/lib/square/disputes/client.rb +149 -0
  120. data/lib/square/disputes/evidence/client.rb +73 -0
  121. data/lib/square/disputes/evidence/types/delete_evidence_request.rb +14 -0
  122. data/lib/square/disputes/evidence/types/get_evidence_request.rb +14 -0
  123. data/lib/square/disputes/evidence/types/list_evidence_request.rb +14 -0
  124. data/lib/square/disputes/types/accept_disputes_request.rb +11 -0
  125. data/lib/square/disputes/types/create_dispute_evidence_text_request.rb +14 -0
  126. data/lib/square/disputes/types/create_evidence_file_disputes_request.rb +11 -0
  127. data/lib/square/disputes/types/get_disputes_request.rb +11 -0
  128. data/lib/square/disputes/types/list_disputes_request.rb +13 -0
  129. data/lib/square/disputes/types/submit_evidence_disputes_request.rb +11 -0
  130. data/lib/square/employees/client.rb +47 -0
  131. data/lib/square/employees/types/get_employees_request.rb +11 -0
  132. data/lib/square/employees/types/list_employees_request.rb +14 -0
  133. data/lib/square/environment.rb +8 -0
  134. data/lib/square/events/client.rb +88 -0
  135. data/lib/square/events/types/list_event_types_request.rb +11 -0
  136. data/lib/square/events/types/search_events_request.rb +13 -0
  137. data/lib/square/file_param.rb +83 -0
  138. data/lib/square/gift_cards/activities/client.rb +59 -0
  139. data/lib/square/gift_cards/activities/types/create_gift_card_activity_request.rb +14 -0
  140. data/lib/square/gift_cards/activities/types/list_activities_request.rb +20 -0
  141. data/lib/square/gift_cards/client.rb +155 -0
  142. data/lib/square/gift_cards/types/create_gift_card_request.rb +13 -0
  143. data/lib/square/gift_cards/types/get_gift_card_from_gan_request.rb +11 -0
  144. data/lib/square/gift_cards/types/get_gift_card_from_nonce_request.rb +11 -0
  145. data/lib/square/gift_cards/types/get_gift_cards_request.rb +11 -0
  146. data/lib/square/gift_cards/types/link_customer_to_gift_card_request.rb +12 -0
  147. data/lib/square/gift_cards/types/list_gift_cards_request.rb +15 -0
  148. data/lib/square/gift_cards/types/unlink_customer_from_gift_card_request.rb +12 -0
  149. data/lib/square/internal/errors/constraint_error.rb +10 -0
  150. data/lib/square/internal/errors/type_error.rb +10 -0
  151. data/lib/square/internal/http/base_request.rb +31 -0
  152. data/lib/square/internal/http/raw_client.rb +105 -0
  153. data/lib/square/internal/json/request.rb +38 -0
  154. data/lib/square/internal/json/serializable.rb +25 -0
  155. data/lib/square/internal/multipart/multipart_encoder.rb +141 -0
  156. data/lib/square/internal/multipart/multipart_form_data.rb +78 -0
  157. data/lib/square/internal/multipart/multipart_form_data_part.rb +51 -0
  158. data/lib/square/internal/multipart/multipart_request.rb +37 -0
  159. data/lib/square/internal/types/array.rb +47 -0
  160. data/lib/square/internal/types/boolean.rb +34 -0
  161. data/lib/square/internal/types/enum.rb +48 -0
  162. data/lib/square/internal/types/hash.rb +36 -0
  163. data/lib/square/internal/types/model/field.rb +28 -0
  164. data/lib/square/internal/types/model.rb +198 -0
  165. data/lib/square/internal/types/type.rb +35 -0
  166. data/lib/square/internal/types/union.rb +80 -0
  167. data/lib/square/internal/types/unknown.rb +15 -0
  168. data/lib/square/internal/types/utils.rb +100 -0
  169. data/lib/square/inventory/client.rb +293 -0
  170. data/lib/square/inventory/types/changes_inventory_request.rb +13 -0
  171. data/lib/square/inventory/types/deprecated_get_adjustment_inventory_request.rb +11 -0
  172. data/lib/square/inventory/types/deprecated_get_physical_count_inventory_request.rb +11 -0
  173. data/lib/square/inventory/types/get_adjustment_inventory_request.rb +11 -0
  174. data/lib/square/inventory/types/get_inventory_request.rb +13 -0
  175. data/lib/square/inventory/types/get_physical_count_inventory_request.rb +11 -0
  176. data/lib/square/inventory/types/get_transfer_inventory_request.rb +11 -0
  177. data/lib/square/invoices/client.rb +255 -0
  178. data/lib/square/invoices/types/cancel_invoice_request.rb +12 -0
  179. data/lib/square/invoices/types/create_invoice_attachment_request.rb +11 -0
  180. data/lib/square/invoices/types/create_invoice_request.rb +12 -0
  181. data/lib/square/invoices/types/delete_invoice_attachment_request.rb +12 -0
  182. data/lib/square/invoices/types/delete_invoices_request.rb +12 -0
  183. data/lib/square/invoices/types/get_invoices_request.rb +11 -0
  184. data/lib/square/invoices/types/list_invoices_request.rb +13 -0
  185. data/lib/square/invoices/types/publish_invoice_request.rb +13 -0
  186. data/lib/square/invoices/types/search_invoices_request.rb +13 -0
  187. data/lib/square/invoices/types/update_invoice_request.rb +14 -0
  188. data/lib/square/labor/break_types/client.rb +123 -0
  189. data/lib/square/labor/break_types/types/create_break_type_request.rb +14 -0
  190. data/lib/square/labor/break_types/types/delete_break_types_request.rb +13 -0
  191. data/lib/square/labor/break_types/types/get_break_types_request.rb +13 -0
  192. data/lib/square/labor/break_types/types/list_break_types_request.rb +15 -0
  193. data/lib/square/labor/break_types/types/update_break_type_request.rb +14 -0
  194. data/lib/square/labor/client.rb +297 -0
  195. data/lib/square/labor/employee_wages/client.rb +53 -0
  196. data/lib/square/labor/employee_wages/types/get_employee_wages_request.rb +13 -0
  197. data/lib/square/labor/employee_wages/types/list_employee_wages_request.rb +15 -0
  198. data/lib/square/labor/shifts/client.rb +140 -0
  199. data/lib/square/labor/shifts/types/create_shift_request.rb +14 -0
  200. data/lib/square/labor/shifts/types/delete_shifts_request.rb +13 -0
  201. data/lib/square/labor/shifts/types/get_shifts_request.rb +13 -0
  202. data/lib/square/labor/shifts/types/search_shifts_request.rb +15 -0
  203. data/lib/square/labor/shifts/types/update_shift_request.rb +14 -0
  204. data/lib/square/labor/team_member_wages/client.rb +53 -0
  205. data/lib/square/labor/team_member_wages/types/get_team_member_wages_request.rb +13 -0
  206. data/lib/square/labor/team_member_wages/types/list_team_member_wages_request.rb +15 -0
  207. data/lib/square/labor/types/bulk_publish_scheduled_shifts_request.rb +16 -0
  208. data/lib/square/labor/types/create_scheduled_shift_request.rb +12 -0
  209. data/lib/square/labor/types/create_timecard_request.rb +12 -0
  210. data/lib/square/labor/types/delete_timecard_request.rb +11 -0
  211. data/lib/square/labor/types/publish_scheduled_shift_request.rb +16 -0
  212. data/lib/square/labor/types/retrieve_scheduled_shift_request.rb +11 -0
  213. data/lib/square/labor/types/retrieve_timecard_request.rb +11 -0
  214. data/lib/square/labor/types/search_scheduled_shifts_request.rb +13 -0
  215. data/lib/square/labor/types/search_timecards_request.rb +13 -0
  216. data/lib/square/labor/types/update_scheduled_shift_request.rb +12 -0
  217. data/lib/square/labor/types/update_timecard_request.rb +12 -0
  218. data/lib/square/labor/workweek_configs/client.rb +56 -0
  219. data/lib/square/labor/workweek_configs/types/list_workweek_configs_request.rb +14 -0
  220. data/lib/square/labor/workweek_configs/types/update_workweek_config_request.rb +14 -0
  221. data/lib/square/locations/client.rb +133 -0
  222. data/lib/square/locations/custom_attribute_definitions/client.rb +130 -0
  223. data/lib/square/locations/custom_attribute_definitions/types/create_location_custom_attribute_definition_request.rb +16 -0
  224. data/lib/square/locations/custom_attribute_definitions/types/delete_custom_attribute_definitions_request.rb +13 -0
  225. data/lib/square/locations/custom_attribute_definitions/types/get_custom_attribute_definitions_request.rb +14 -0
  226. data/lib/square/locations/custom_attribute_definitions/types/list_custom_attribute_definitions_request.rb +15 -0
  227. data/lib/square/locations/custom_attribute_definitions/types/update_location_custom_attribute_definition_request.rb +17 -0
  228. data/lib/square/locations/custom_attributes/client.rb +158 -0
  229. data/lib/square/locations/custom_attributes/types/bulk_delete_location_custom_attributes_request.rb +15 -0
  230. data/lib/square/locations/custom_attributes/types/bulk_upsert_location_custom_attributes_request.rb +15 -0
  231. data/lib/square/locations/custom_attributes/types/delete_custom_attributes_request.rb +14 -0
  232. data/lib/square/locations/custom_attributes/types/get_custom_attributes_request.rb +16 -0
  233. data/lib/square/locations/custom_attributes/types/list_custom_attributes_request.rb +17 -0
  234. data/lib/square/locations/custom_attributes/types/upsert_location_custom_attribute_request.rb +16 -0
  235. data/lib/square/locations/transactions/client.rb +102 -0
  236. data/lib/square/locations/transactions/types/capture_transactions_request.rb +14 -0
  237. data/lib/square/locations/transactions/types/get_transactions_request.rb +14 -0
  238. data/lib/square/locations/transactions/types/list_transactions_request.rb +17 -0
  239. data/lib/square/locations/transactions/types/void_transactions_request.rb +14 -0
  240. data/lib/square/locations/types/create_checkout_request.rb +22 -0
  241. data/lib/square/locations/types/create_location_request.rb +11 -0
  242. data/lib/square/locations/types/get_locations_request.rb +11 -0
  243. data/lib/square/locations/types/update_location_request.rb +12 -0
  244. data/lib/square/loyalty/accounts/client.rb +128 -0
  245. data/lib/square/loyalty/accounts/types/accumulate_loyalty_points_request.rb +16 -0
  246. data/lib/square/loyalty/accounts/types/adjust_loyalty_points_request.rb +16 -0
  247. data/lib/square/loyalty/accounts/types/create_loyalty_account_request.rb +14 -0
  248. data/lib/square/loyalty/accounts/types/get_accounts_request.rb +13 -0
  249. data/lib/square/loyalty/accounts/types/search_loyalty_accounts_request.rb +17 -0
  250. data/lib/square/loyalty/client.rb +52 -0
  251. data/lib/square/loyalty/programs/client.rb +93 -0
  252. data/lib/square/loyalty/programs/promotions/client.rb +103 -0
  253. data/lib/square/loyalty/programs/promotions/types/cancel_promotions_request.rb +16 -0
  254. data/lib/square/loyalty/programs/promotions/types/create_loyalty_promotion_request.rb +17 -0
  255. data/lib/square/loyalty/programs/promotions/types/get_promotions_request.rb +16 -0
  256. data/lib/square/loyalty/programs/promotions/types/list_promotions_request.rb +18 -0
  257. data/lib/square/loyalty/programs/types/calculate_loyalty_points_request.rb +16 -0
  258. data/lib/square/loyalty/programs/types/get_programs_request.rb +13 -0
  259. data/lib/square/loyalty/rewards/client.rb +135 -0
  260. data/lib/square/loyalty/rewards/types/create_loyalty_reward_request.rb +14 -0
  261. data/lib/square/loyalty/rewards/types/delete_rewards_request.rb +13 -0
  262. data/lib/square/loyalty/rewards/types/get_rewards_request.rb +13 -0
  263. data/lib/square/loyalty/rewards/types/redeem_loyalty_reward_request.rb +15 -0
  264. data/lib/square/loyalty/rewards/types/search_loyalty_rewards_request.rb +17 -0
  265. data/lib/square/loyalty/types/search_loyalty_events_request.rb +13 -0
  266. data/lib/square/merchants/client.rb +70 -0
  267. data/lib/square/merchants/custom_attribute_definitions/client.rb +130 -0
  268. data/lib/square/merchants/custom_attribute_definitions/types/create_merchant_custom_attribute_definition_request.rb +16 -0
  269. data/lib/square/merchants/custom_attribute_definitions/types/delete_custom_attribute_definitions_request.rb +13 -0
  270. data/lib/square/merchants/custom_attribute_definitions/types/get_custom_attribute_definitions_request.rb +14 -0
  271. data/lib/square/merchants/custom_attribute_definitions/types/list_custom_attribute_definitions_request.rb +15 -0
  272. data/lib/square/merchants/custom_attribute_definitions/types/update_merchant_custom_attribute_definition_request.rb +17 -0
  273. data/lib/square/merchants/custom_attributes/client.rb +158 -0
  274. data/lib/square/merchants/custom_attributes/types/bulk_delete_merchant_custom_attributes_request.rb +15 -0
  275. data/lib/square/merchants/custom_attributes/types/bulk_upsert_merchant_custom_attributes_request.rb +15 -0
  276. data/lib/square/merchants/custom_attributes/types/delete_custom_attributes_request.rb +14 -0
  277. data/lib/square/merchants/custom_attributes/types/get_custom_attributes_request.rb +16 -0
  278. data/lib/square/merchants/custom_attributes/types/list_custom_attributes_request.rb +17 -0
  279. data/lib/square/merchants/custom_attributes/types/upsert_merchant_custom_attribute_request.rb +16 -0
  280. data/lib/square/merchants/types/get_merchants_request.rb +11 -0
  281. data/lib/square/merchants/types/list_merchants_request.rb +11 -0
  282. data/lib/square/mobile/client.rb +44 -0
  283. data/lib/square/mobile/types/create_mobile_authorization_code_request.rb +11 -0
  284. data/lib/square/o_auth/client.rb +124 -0
  285. data/lib/square/o_auth/types/obtain_token_request.rb +20 -0
  286. data/lib/square/o_auth/types/revoke_token_request.rb +14 -0
  287. data/lib/square/orders/client.rb +217 -0
  288. data/lib/square/orders/custom_attribute_definitions/client.rb +130 -0
  289. data/lib/square/orders/custom_attribute_definitions/types/create_order_custom_attribute_definition_request.rb +16 -0
  290. data/lib/square/orders/custom_attribute_definitions/types/delete_custom_attribute_definitions_request.rb +13 -0
  291. data/lib/square/orders/custom_attribute_definitions/types/get_custom_attribute_definitions_request.rb +14 -0
  292. data/lib/square/orders/custom_attribute_definitions/types/list_custom_attribute_definitions_request.rb +15 -0
  293. data/lib/square/orders/custom_attribute_definitions/types/update_order_custom_attribute_definition_request.rb +17 -0
  294. data/lib/square/orders/custom_attributes/client.rb +183 -0
  295. data/lib/square/orders/custom_attributes/types/bulk_delete_order_custom_attributes_request.rb +15 -0
  296. data/lib/square/orders/custom_attributes/types/bulk_upsert_order_custom_attributes_request.rb +15 -0
  297. data/lib/square/orders/custom_attributes/types/delete_custom_attributes_request.rb +14 -0
  298. data/lib/square/orders/custom_attributes/types/get_custom_attributes_request.rb +16 -0
  299. data/lib/square/orders/custom_attributes/types/list_custom_attributes_request.rb +17 -0
  300. data/lib/square/orders/custom_attributes/types/upsert_order_custom_attribute_request.rb +16 -0
  301. data/lib/square/orders/types/batch_get_orders_request.rb +12 -0
  302. data/lib/square/orders/types/calculate_order_request.rb +14 -0
  303. data/lib/square/orders/types/clone_order_request.rb +13 -0
  304. data/lib/square/orders/types/get_orders_request.rb +11 -0
  305. data/lib/square/orders/types/pay_order_request.rb +14 -0
  306. data/lib/square/orders/types/search_orders_request.rb +15 -0
  307. data/lib/square/orders/types/update_order_request.rb +14 -0
  308. data/lib/square/payments/client.rb +172 -0
  309. data/lib/square/payments/types/cancel_payment_by_idempotency_key_request.rb +11 -0
  310. data/lib/square/payments/types/cancel_payments_request.rb +11 -0
  311. data/lib/square/payments/types/complete_payment_request.rb +12 -0
  312. data/lib/square/payments/types/create_payment_request.rb +35 -0
  313. data/lib/square/payments/types/get_payments_request.rb +11 -0
  314. data/lib/square/payments/types/list_payments_request.rb +25 -0
  315. data/lib/square/payments/types/update_payment_request.rb +13 -0
  316. data/lib/square/payouts/client.rb +77 -0
  317. data/lib/square/payouts/types/get_payouts_request.rb +11 -0
  318. data/lib/square/payouts/types/list_entries_payouts_request.rb +14 -0
  319. data/lib/square/payouts/types/list_payouts_request.rb +17 -0
  320. data/lib/square/refunds/client.rb +78 -0
  321. data/lib/square/refunds/types/get_refunds_request.rb +11 -0
  322. data/lib/square/refunds/types/list_refunds_request.rb +21 -0
  323. data/lib/square/refunds/types/refund_payment_request.rb +25 -0
  324. data/lib/square/sites/client.rb +32 -0
  325. data/lib/square/snippets/client.rb +82 -0
  326. data/lib/square/snippets/types/delete_snippets_request.rb +11 -0
  327. data/lib/square/snippets/types/get_snippets_request.rb +11 -0
  328. data/lib/square/snippets/types/upsert_snippet_request.rb +12 -0
  329. data/lib/square/subscriptions/client.rb +268 -0
  330. data/lib/square/subscriptions/types/bulk_swap_plan_request.rb +13 -0
  331. data/lib/square/subscriptions/types/cancel_subscriptions_request.rb +11 -0
  332. data/lib/square/subscriptions/types/change_billing_anchor_date_request.rb +13 -0
  333. data/lib/square/subscriptions/types/create_subscription_request.rb +23 -0
  334. data/lib/square/subscriptions/types/delete_action_subscriptions_request.rb +12 -0
  335. data/lib/square/subscriptions/types/get_subscriptions_request.rb +12 -0
  336. data/lib/square/subscriptions/types/list_events_subscriptions_request.rb +13 -0
  337. data/lib/square/subscriptions/types/pause_subscription_request.rb +16 -0
  338. data/lib/square/subscriptions/types/resume_subscription_request.rb +13 -0
  339. data/lib/square/subscriptions/types/search_subscriptions_request.rb +14 -0
  340. data/lib/square/subscriptions/types/swap_plan_request.rb +13 -0
  341. data/lib/square/subscriptions/types/update_subscription_request.rb +12 -0
  342. data/lib/square/team/client.rb +90 -0
  343. data/lib/square/team/types/create_job_request.rb +12 -0
  344. data/lib/square/team/types/list_jobs_request.rb +11 -0
  345. data/lib/square/team/types/retrieve_job_request.rb +11 -0
  346. data/lib/square/team/types/update_job_request.rb +12 -0
  347. data/lib/square/team_members/client.rb +144 -0
  348. data/lib/square/team_members/types/batch_create_team_members_request.rb +13 -0
  349. data/lib/square/team_members/types/batch_update_team_members_request.rb +13 -0
  350. data/lib/square/team_members/types/get_team_members_request.rb +11 -0
  351. data/lib/square/team_members/types/search_team_members_request.rb +13 -0
  352. data/lib/square/team_members/types/update_team_members_request.rb +12 -0
  353. data/lib/square/team_members/wage_setting/client.rb +63 -0
  354. data/lib/square/team_members/wage_setting/types/get_wage_setting_request.rb +13 -0
  355. data/lib/square/team_members/wage_setting/types/update_wage_setting_request.rb +14 -0
  356. data/lib/square/terminal/actions/client.rb +84 -0
  357. data/lib/square/terminal/actions/types/cancel_actions_request.rb +13 -0
  358. data/lib/square/terminal/actions/types/create_terminal_action_request.rb +14 -0
  359. data/lib/square/terminal/actions/types/get_actions_request.rb +13 -0
  360. data/lib/square/terminal/actions/types/search_terminal_actions_request.rb +15 -0
  361. data/lib/square/terminal/checkouts/client.rb +85 -0
  362. data/lib/square/terminal/checkouts/types/cancel_checkouts_request.rb +13 -0
  363. data/lib/square/terminal/checkouts/types/create_terminal_checkout_request.rb +14 -0
  364. data/lib/square/terminal/checkouts/types/get_checkouts_request.rb +13 -0
  365. data/lib/square/terminal/checkouts/types/search_terminal_checkouts_request.rb +15 -0
  366. data/lib/square/terminal/client.rb +80 -0
  367. data/lib/square/terminal/refunds/client.rb +84 -0
  368. data/lib/square/terminal/refunds/types/cancel_refunds_request.rb +13 -0
  369. data/lib/square/terminal/refunds/types/create_terminal_refund_request.rb +14 -0
  370. data/lib/square/terminal/refunds/types/get_refunds_request.rb +13 -0
  371. data/lib/square/terminal/refunds/types/search_terminal_refunds_request.rb +15 -0
  372. data/lib/square/terminal/types/dismiss_terminal_action_request.rb +11 -0
  373. data/lib/square/terminal/types/dismiss_terminal_checkout_request.rb +11 -0
  374. data/lib/square/terminal/types/dismiss_terminal_refund_request.rb +11 -0
  375. data/lib/square/types/accept_dispute_response.rb +11 -0
  376. data/lib/square/types/accepted_payment_methods.rb +12 -0
  377. data/lib/square/types/accumulate_loyalty_points_response.rb +12 -0
  378. data/lib/square/types/ach_details.rb +12 -0
  379. data/lib/square/types/action_cancel_reason.rb +12 -0
  380. data/lib/square/types/activity_type.rb +67 -0
  381. data/lib/square/types/add_group_to_customer_response.rb +11 -0
  382. data/lib/square/types/additional_recipient.rb +13 -0
  383. data/lib/square/types/address.rb +24 -0
  384. data/lib/square/types/adjust_loyalty_points_response.rb +11 -0
  385. data/lib/square/types/afterpay_details.rb +10 -0
  386. data/lib/square/types/application_details.rb +13 -0
  387. data/lib/square/types/application_details_external_square_product.rb +19 -0
  388. data/lib/square/types/appointment_segment.rb +16 -0
  389. data/lib/square/types/archived_state.rb +12 -0
  390. data/lib/square/types/availability.rb +14 -0
  391. data/lib/square/types/bank_account.rb +28 -0
  392. data/lib/square/types/bank_account_created_event.rb +17 -0
  393. data/lib/square/types/bank_account_created_event_data.rb +11 -0
  394. data/lib/square/types/bank_account_created_event_object.rb +9 -0
  395. data/lib/square/types/bank_account_disabled_event.rb +16 -0
  396. data/lib/square/types/bank_account_disabled_event_data.rb +11 -0
  397. data/lib/square/types/bank_account_disabled_event_object.rb +9 -0
  398. data/lib/square/types/bank_account_payment_details.rb +17 -0
  399. data/lib/square/types/bank_account_status.rb +12 -0
  400. data/lib/square/types/bank_account_type.rb +14 -0
  401. data/lib/square/types/bank_account_verified_event.rb +16 -0
  402. data/lib/square/types/bank_account_verified_event_data.rb +11 -0
  403. data/lib/square/types/bank_account_verified_event_object.rb +9 -0
  404. data/lib/square/types/batch_change_inventory_request.rb +11 -0
  405. data/lib/square/types/batch_change_inventory_response.rb +11 -0
  406. data/lib/square/types/batch_create_team_members_response.rb +13 -0
  407. data/lib/square/types/batch_create_vendors_response.rb +13 -0
  408. data/lib/square/types/batch_delete_catalog_objects_response.rb +11 -0
  409. data/lib/square/types/batch_get_catalog_objects_response.rb +13 -0
  410. data/lib/square/types/batch_get_inventory_changes_response.rb +11 -0
  411. data/lib/square/types/batch_get_inventory_counts_request.rb +14 -0
  412. data/lib/square/types/batch_get_inventory_counts_response.rb +11 -0
  413. data/lib/square/types/batch_get_orders_response.rb +12 -0
  414. data/lib/square/types/batch_get_vendors_response.rb +13 -0
  415. data/lib/square/types/batch_retrieve_inventory_changes_request.rb +16 -0
  416. data/lib/square/types/batch_update_team_members_response.rb +13 -0
  417. data/lib/square/types/batch_update_vendors_response.rb +13 -0
  418. data/lib/square/types/batch_upsert_catalog_objects_response.rb +14 -0
  419. data/lib/square/types/batch_upsert_customer_custom_attributes_request_customer_custom_attribute_upsert_request.rb +14 -0
  420. data/lib/square/types/batch_upsert_customer_custom_attributes_response.rb +14 -0
  421. data/lib/square/types/batch_upsert_customer_custom_attributes_response_customer_custom_attribute_upsert_response.rb +12 -0
  422. data/lib/square/types/booking.rb +31 -0
  423. data/lib/square/types/booking_booking_source.rb +13 -0
  424. data/lib/square/types/booking_created_event.rb +17 -0
  425. data/lib/square/types/booking_created_event_data.rb +11 -0
  426. data/lib/square/types/booking_created_event_object.rb +9 -0
  427. data/lib/square/types/booking_creator_details.rb +12 -0
  428. data/lib/square/types/booking_creator_details_creator_type.rb +11 -0
  429. data/lib/square/types/booking_custom_attribute_definition_owned_created_event.rb +16 -0
  430. data/lib/square/types/booking_custom_attribute_definition_owned_deleted_event.rb +16 -0
  431. data/lib/square/types/booking_custom_attribute_definition_owned_updated_event.rb +16 -0
  432. data/lib/square/types/booking_custom_attribute_definition_visible_created_event.rb +17 -0
  433. data/lib/square/types/booking_custom_attribute_definition_visible_deleted_event.rb +17 -0
  434. data/lib/square/types/booking_custom_attribute_definition_visible_updated_event.rb +17 -0
  435. data/lib/square/types/booking_custom_attribute_delete_request.rb +12 -0
  436. data/lib/square/types/booking_custom_attribute_delete_response.rb +11 -0
  437. data/lib/square/types/booking_custom_attribute_owned_deleted_event.rb +18 -0
  438. data/lib/square/types/booking_custom_attribute_owned_updated_event.rb +16 -0
  439. data/lib/square/types/booking_custom_attribute_upsert_request.rb +14 -0
  440. data/lib/square/types/booking_custom_attribute_upsert_response.rb +12 -0
  441. data/lib/square/types/booking_custom_attribute_visible_deleted_event.rb +17 -0
  442. data/lib/square/types/booking_custom_attribute_visible_updated_event.rb +17 -0
  443. data/lib/square/types/booking_status.rb +15 -0
  444. data/lib/square/types/booking_updated_event.rb +17 -0
  445. data/lib/square/types/booking_updated_event_data.rb +11 -0
  446. data/lib/square/types/booking_updated_event_object.rb +9 -0
  447. data/lib/square/types/break_.rb +16 -0
  448. data/lib/square/types/break_type.rb +18 -0
  449. data/lib/square/types/bulk_create_customer_data.rb +21 -0
  450. data/lib/square/types/bulk_create_customers_response.rb +14 -0
  451. data/lib/square/types/bulk_delete_booking_custom_attributes_response.rb +14 -0
  452. data/lib/square/types/bulk_delete_customers_response.rb +14 -0
  453. data/lib/square/types/bulk_delete_location_custom_attributes_request_location_custom_attribute_delete_request.rb +12 -0
  454. data/lib/square/types/bulk_delete_location_custom_attributes_response.rb +14 -0
  455. data/lib/square/types/bulk_delete_location_custom_attributes_response_location_custom_attribute_delete_response.rb +12 -0
  456. data/lib/square/types/bulk_delete_merchant_custom_attributes_request_merchant_custom_attribute_delete_request.rb +12 -0
  457. data/lib/square/types/bulk_delete_merchant_custom_attributes_response.rb +14 -0
  458. data/lib/square/types/bulk_delete_merchant_custom_attributes_response_merchant_custom_attribute_delete_response.rb +11 -0
  459. data/lib/square/types/bulk_delete_order_custom_attributes_request_delete_custom_attribute.rb +11 -0
  460. data/lib/square/types/bulk_delete_order_custom_attributes_response.rb +13 -0
  461. data/lib/square/types/bulk_publish_scheduled_shifts_data.rb +12 -0
  462. data/lib/square/types/bulk_publish_scheduled_shifts_response.rb +14 -0
  463. data/lib/square/types/bulk_retrieve_bookings_response.rb +13 -0
  464. data/lib/square/types/bulk_retrieve_customers_response.rb +14 -0
  465. data/lib/square/types/bulk_retrieve_team_member_booking_profiles_response.rb +13 -0
  466. data/lib/square/types/bulk_swap_plan_response.rb +12 -0
  467. data/lib/square/types/bulk_update_customer_data.rb +22 -0
  468. data/lib/square/types/bulk_update_customers_response.rb +14 -0
  469. data/lib/square/types/bulk_upsert_booking_custom_attributes_response.rb +14 -0
  470. data/lib/square/types/bulk_upsert_location_custom_attributes_request_location_custom_attribute_upsert_request.rb +14 -0
  471. data/lib/square/types/bulk_upsert_location_custom_attributes_response.rb +14 -0
  472. data/lib/square/types/bulk_upsert_location_custom_attributes_response_location_custom_attribute_upsert_response.rb +12 -0
  473. data/lib/square/types/bulk_upsert_merchant_custom_attributes_request_merchant_custom_attribute_upsert_request.rb +14 -0
  474. data/lib/square/types/bulk_upsert_merchant_custom_attributes_response.rb +14 -0
  475. data/lib/square/types/bulk_upsert_merchant_custom_attributes_response_merchant_custom_attribute_upsert_response.rb +12 -0
  476. data/lib/square/types/bulk_upsert_order_custom_attributes_request_upsert_custom_attribute.rb +12 -0
  477. data/lib/square/types/bulk_upsert_order_custom_attributes_response.rb +13 -0
  478. data/lib/square/types/business_appointment_settings.rb +30 -0
  479. data/lib/square/types/business_appointment_settings_alignment_time.rb +13 -0
  480. data/lib/square/types/business_appointment_settings_booking_location_type.rb +12 -0
  481. data/lib/square/types/business_appointment_settings_cancellation_policy.rb +11 -0
  482. data/lib/square/types/business_appointment_settings_max_appointments_per_day_limit_type.rb +11 -0
  483. data/lib/square/types/business_booking_profile.rb +21 -0
  484. data/lib/square/types/business_booking_profile_booking_policy.rb +11 -0
  485. data/lib/square/types/business_booking_profile_customer_timezone_choice.rb +11 -0
  486. data/lib/square/types/business_hours.rb +10 -0
  487. data/lib/square/types/business_hours_period.rb +12 -0
  488. data/lib/square/types/buy_now_pay_later_details.rb +12 -0
  489. data/lib/square/types/calculate_loyalty_points_response.rb +12 -0
  490. data/lib/square/types/calculate_order_response.rb +10 -0
  491. data/lib/square/types/cancel_booking_response.rb +10 -0
  492. data/lib/square/types/cancel_invoice_response.rb +11 -0
  493. data/lib/square/types/cancel_loyalty_promotion_response.rb +12 -0
  494. data/lib/square/types/cancel_payment_by_idempotency_key_response.rb +12 -0
  495. data/lib/square/types/cancel_payment_response.rb +11 -0
  496. data/lib/square/types/cancel_subscription_response.rb +13 -0
  497. data/lib/square/types/cancel_terminal_action_response.rb +10 -0
  498. data/lib/square/types/cancel_terminal_checkout_response.rb +10 -0
  499. data/lib/square/types/cancel_terminal_refund_response.rb +10 -0
  500. data/lib/square/types/capture_transaction_response.rb +11 -0
  501. data/lib/square/types/card.rb +30 -0
  502. data/lib/square/types/card_automatically_updated_event.rb +15 -0
  503. data/lib/square/types/card_automatically_updated_event_data.rb +11 -0
  504. data/lib/square/types/card_automatically_updated_event_object.rb +9 -0
  505. data/lib/square/types/card_brand.rb +23 -0
  506. data/lib/square/types/card_co_brand.rb +12 -0
  507. data/lib/square/types/card_created_event.rb +14 -0
  508. data/lib/square/types/card_created_event_data.rb +11 -0
  509. data/lib/square/types/card_created_event_object.rb +9 -0
  510. data/lib/square/types/card_disabled_event.rb +14 -0
  511. data/lib/square/types/card_disabled_event_data.rb +11 -0
  512. data/lib/square/types/card_disabled_event_object.rb +9 -0
  513. data/lib/square/types/card_forgotten_event.rb +14 -0
  514. data/lib/square/types/card_forgotten_event_card.rb +14 -0
  515. data/lib/square/types/card_forgotten_event_data.rb +11 -0
  516. data/lib/square/types/card_forgotten_event_object.rb +9 -0
  517. data/lib/square/types/card_payment_details.rb +25 -0
  518. data/lib/square/types/card_payment_timeline.rb +12 -0
  519. data/lib/square/types/card_prepaid_type.rb +12 -0
  520. data/lib/square/types/card_type.rb +12 -0
  521. data/lib/square/types/card_updated_event.rb +14 -0
  522. data/lib/square/types/card_updated_event_data.rb +11 -0
  523. data/lib/square/types/card_updated_event_object.rb +9 -0
  524. data/lib/square/types/cash_app_details.rb +12 -0
  525. data/lib/square/types/cash_drawer_device.rb +10 -0
  526. data/lib/square/types/cash_drawer_event_type.rb +18 -0
  527. data/lib/square/types/cash_drawer_shift.rb +33 -0
  528. data/lib/square/types/cash_drawer_shift_event.rb +14 -0
  529. data/lib/square/types/cash_drawer_shift_state.rb +12 -0
  530. data/lib/square/types/cash_drawer_shift_summary.rb +24 -0
  531. data/lib/square/types/cash_payment_details.rb +12 -0
  532. data/lib/square/types/catalog_availability_period.rb +12 -0
  533. data/lib/square/types/catalog_category.rb +22 -0
  534. data/lib/square/types/catalog_category_type.rb +12 -0
  535. data/lib/square/types/catalog_custom_attribute_definition.rb +37 -0
  536. data/lib/square/types/catalog_custom_attribute_definition_app_visibility.rb +12 -0
  537. data/lib/square/types/catalog_custom_attribute_definition_number_config.rb +9 -0
  538. data/lib/square/types/catalog_custom_attribute_definition_selection_config.rb +13 -0
  539. data/lib/square/types/catalog_custom_attribute_definition_selection_config_custom_attribute_selection.rb +11 -0
  540. data/lib/square/types/catalog_custom_attribute_definition_seller_visibility.rb +11 -0
  541. data/lib/square/types/catalog_custom_attribute_definition_string_config.rb +10 -0
  542. data/lib/square/types/catalog_custom_attribute_definition_type.rb +13 -0
  543. data/lib/square/types/catalog_custom_attribute_value.rb +19 -0
  544. data/lib/square/types/catalog_discount.rb +17 -0
  545. data/lib/square/types/catalog_discount_modify_tax_basis.rb +11 -0
  546. data/lib/square/types/catalog_discount_type.rb +13 -0
  547. data/lib/square/types/catalog_ecom_seo_data.rb +12 -0
  548. data/lib/square/types/catalog_id_mapping.rb +21 -0
  549. data/lib/square/types/catalog_image.rb +18 -0
  550. data/lib/square/types/catalog_info_response.rb +13 -0
  551. data/lib/square/types/catalog_info_response_limits.rb +19 -0
  552. data/lib/square/types/catalog_item.rb +42 -0
  553. data/lib/square/types/catalog_item_food_and_beverage_details.rb +16 -0
  554. data/lib/square/types/catalog_item_food_and_beverage_details_dietary_preference.rb +16 -0
  555. data/lib/square/types/catalog_item_food_and_beverage_details_dietary_preference_standard_dietary_preference.rb +16 -0
  556. data/lib/square/types/catalog_item_food_and_beverage_details_dietary_preference_type.rb +11 -0
  557. data/lib/square/types/catalog_item_food_and_beverage_details_ingredient.rb +16 -0
  558. data/lib/square/types/catalog_item_food_and_beverage_details_ingredient_standard_ingredient.rb +23 -0
  559. data/lib/square/types/catalog_item_modifier_list_info.rb +23 -0
  560. data/lib/square/types/catalog_item_option.rb +14 -0
  561. data/lib/square/types/catalog_item_option_for_item.rb +11 -0
  562. data/lib/square/types/catalog_item_option_value.rb +16 -0
  563. data/lib/square/types/catalog_item_option_value_for_item_variation.rb +14 -0
  564. data/lib/square/types/catalog_item_product_type.rb +18 -0
  565. data/lib/square/types/catalog_item_variation.rb +43 -0
  566. data/lib/square/types/catalog_measurement_unit.rb +12 -0
  567. data/lib/square/types/catalog_modifier.rb +19 -0
  568. data/lib/square/types/catalog_modifier_list.rb +27 -0
  569. data/lib/square/types/catalog_modifier_list_modifier_type.rb +11 -0
  570. data/lib/square/types/catalog_modifier_list_selection_type.rb +11 -0
  571. data/lib/square/types/catalog_modifier_override.rb +13 -0
  572. data/lib/square/types/catalog_object.rb +41 -0
  573. data/lib/square/types/catalog_object_availability_period.rb +9 -0
  574. data/lib/square/types/catalog_object_base.rb +20 -0
  575. data/lib/square/types/catalog_object_batch.rb +10 -0
  576. data/lib/square/types/catalog_object_category.rb +25 -0
  577. data/lib/square/types/catalog_object_custom_attribute_definition.rb +11 -0
  578. data/lib/square/types/catalog_object_discount.rb +9 -0
  579. data/lib/square/types/catalog_object_image.rb +9 -0
  580. data/lib/square/types/catalog_object_item.rb +9 -0
  581. data/lib/square/types/catalog_object_item_option.rb +9 -0
  582. data/lib/square/types/catalog_object_item_option_value.rb +9 -0
  583. data/lib/square/types/catalog_object_item_variation.rb +9 -0
  584. data/lib/square/types/catalog_object_measurement_unit.rb +9 -0
  585. data/lib/square/types/catalog_object_modifier.rb +9 -0
  586. data/lib/square/types/catalog_object_modifier_list.rb +9 -0
  587. data/lib/square/types/catalog_object_pricing_rule.rb +9 -0
  588. data/lib/square/types/catalog_object_product_set.rb +9 -0
  589. data/lib/square/types/catalog_object_quick_amounts_settings.rb +11 -0
  590. data/lib/square/types/catalog_object_reference.rb +13 -0
  591. data/lib/square/types/catalog_object_subscription_plan.rb +9 -0
  592. data/lib/square/types/catalog_object_subscription_plan_variation.rb +11 -0
  593. data/lib/square/types/catalog_object_tax.rb +9 -0
  594. data/lib/square/types/catalog_object_time_period.rb +9 -0
  595. data/lib/square/types/catalog_object_type.rb +28 -0
  596. data/lib/square/types/catalog_pricing_rule.rb +23 -0
  597. data/lib/square/types/catalog_pricing_type.rb +11 -0
  598. data/lib/square/types/catalog_product_set.rb +20 -0
  599. data/lib/square/types/catalog_query.rb +50 -0
  600. data/lib/square/types/catalog_query_exact.rb +11 -0
  601. data/lib/square/types/catalog_query_item_variations_for_item_option_values.rb +10 -0
  602. data/lib/square/types/catalog_query_items_for_item_options.rb +10 -0
  603. data/lib/square/types/catalog_query_items_for_modifier_list.rb +10 -0
  604. data/lib/square/types/catalog_query_items_for_tax.rb +10 -0
  605. data/lib/square/types/catalog_query_prefix.rb +11 -0
  606. data/lib/square/types/catalog_query_range.rb +12 -0
  607. data/lib/square/types/catalog_query_set.rb +12 -0
  608. data/lib/square/types/catalog_query_sorted_attribute.rb +12 -0
  609. data/lib/square/types/catalog_query_text.rb +10 -0
  610. data/lib/square/types/catalog_quick_amount.rb +13 -0
  611. data/lib/square/types/catalog_quick_amount_type.rb +11 -0
  612. data/lib/square/types/catalog_quick_amounts_settings.rb +12 -0
  613. data/lib/square/types/catalog_quick_amounts_settings_option.rb +12 -0
  614. data/lib/square/types/catalog_stock_conversion.rb +14 -0
  615. data/lib/square/types/catalog_subscription_plan.rb +18 -0
  616. data/lib/square/types/catalog_subscription_plan_variation.rb +16 -0
  617. data/lib/square/types/catalog_tax.rb +16 -0
  618. data/lib/square/types/catalog_time_period.rb +10 -0
  619. data/lib/square/types/catalog_v_1_id.rb +11 -0
  620. data/lib/square/types/catalog_version_updated_event.rb +14 -0
  621. data/lib/square/types/catalog_version_updated_event_catalog_version.rb +9 -0
  622. data/lib/square/types/catalog_version_updated_event_data.rb +10 -0
  623. data/lib/square/types/catalog_version_updated_event_object.rb +11 -0
  624. data/lib/square/types/category_path_to_root_node.rb +11 -0
  625. data/lib/square/types/change_billing_anchor_date_response.rb +13 -0
  626. data/lib/square/types/change_timing.rb +11 -0
  627. data/lib/square/types/charge_request_additional_recipient.rb +13 -0
  628. data/lib/square/types/checkout.rb +22 -0
  629. data/lib/square/types/checkout_location_settings.rb +17 -0
  630. data/lib/square/types/checkout_location_settings_branding.rb +15 -0
  631. data/lib/square/types/checkout_location_settings_branding_button_shape.rb +12 -0
  632. data/lib/square/types/checkout_location_settings_branding_header_type.rb +12 -0
  633. data/lib/square/types/checkout_location_settings_coupons.rb +9 -0
  634. data/lib/square/types/checkout_location_settings_policy.rb +11 -0
  635. data/lib/square/types/checkout_location_settings_tipping.rb +13 -0
  636. data/lib/square/types/checkout_merchant_settings.rb +12 -0
  637. data/lib/square/types/checkout_merchant_settings_payment_methods.rb +20 -0
  638. data/lib/square/types/checkout_merchant_settings_payment_methods_afterpay_clearpay.rb +16 -0
  639. data/lib/square/types/checkout_merchant_settings_payment_methods_afterpay_clearpay_eligibility_range.rb +11 -0
  640. data/lib/square/types/checkout_merchant_settings_payment_methods_payment_method.rb +10 -0
  641. data/lib/square/types/checkout_options.rb +19 -0
  642. data/lib/square/types/checkout_options_payment_type.rb +17 -0
  643. data/lib/square/types/clearpay_details.rb +10 -0
  644. data/lib/square/types/clone_order_response.rb +12 -0
  645. data/lib/square/types/collected_data.rb +9 -0
  646. data/lib/square/types/complete_payment_response.rb +11 -0
  647. data/lib/square/types/component.rb +23 -0
  648. data/lib/square/types/component_component_type.rb +15 -0
  649. data/lib/square/types/confirmation_decision.rb +9 -0
  650. data/lib/square/types/confirmation_options.rb +13 -0
  651. data/lib/square/types/coordinates.rb +11 -0
  652. data/lib/square/types/country.rb +259 -0
  653. data/lib/square/types/create_booking_custom_attribute_definition_response.rb +14 -0
  654. data/lib/square/types/create_booking_response.rb +10 -0
  655. data/lib/square/types/create_break_type_response.rb +13 -0
  656. data/lib/square/types/create_card_response.rb +15 -0
  657. data/lib/square/types/create_catalog_image_request.rb +12 -0
  658. data/lib/square/types/create_catalog_image_response.rb +10 -0
  659. data/lib/square/types/create_checkout_response.rb +12 -0
  660. data/lib/square/types/create_customer_card_response.rb +14 -0
  661. data/lib/square/types/create_customer_custom_attribute_definition_response.rb +14 -0
  662. data/lib/square/types/create_customer_group_response.rb +14 -0
  663. data/lib/square/types/create_customer_response.rb +15 -0
  664. data/lib/square/types/create_device_code_response.rb +10 -0
  665. data/lib/square/types/create_dispute_evidence_file_request.rb +12 -0
  666. data/lib/square/types/create_dispute_evidence_file_response.rb +11 -0
  667. data/lib/square/types/create_dispute_evidence_text_response.rb +11 -0
  668. data/lib/square/types/create_gift_card_activity_response.rb +12 -0
  669. data/lib/square/types/create_gift_card_response.rb +12 -0
  670. data/lib/square/types/create_invoice_attachment_request_data.rb +11 -0
  671. data/lib/square/types/create_invoice_attachment_response.rb +11 -0
  672. data/lib/square/types/create_invoice_response.rb +11 -0
  673. data/lib/square/types/create_job_response.rb +12 -0
  674. data/lib/square/types/create_location_custom_attribute_definition_response.rb +14 -0
  675. data/lib/square/types/create_location_response.rb +11 -0
  676. data/lib/square/types/create_loyalty_account_response.rb +11 -0
  677. data/lib/square/types/create_loyalty_promotion_response.rb +12 -0
  678. data/lib/square/types/create_loyalty_reward_response.rb +11 -0
  679. data/lib/square/types/create_merchant_custom_attribute_definition_response.rb +14 -0
  680. data/lib/square/types/create_mobile_authorization_code_response.rb +13 -0
  681. data/lib/square/types/create_order_custom_attribute_definition_response.rb +13 -0
  682. data/lib/square/types/create_order_request.rb +10 -0
  683. data/lib/square/types/create_order_response.rb +14 -0
  684. data/lib/square/types/create_payment_link_response.rb +11 -0
  685. data/lib/square/types/create_payment_response.rb +14 -0
  686. data/lib/square/types/create_scheduled_shift_response.rb +12 -0
  687. data/lib/square/types/create_shift_response.rb +13 -0
  688. data/lib/square/types/create_subscription_response.rb +12 -0
  689. data/lib/square/types/create_team_member_request.rb +11 -0
  690. data/lib/square/types/create_team_member_response.rb +11 -0
  691. data/lib/square/types/create_terminal_action_response.rb +10 -0
  692. data/lib/square/types/create_terminal_checkout_response.rb +10 -0
  693. data/lib/square/types/create_terminal_refund_response.rb +10 -0
  694. data/lib/square/types/create_timecard_response.rb +13 -0
  695. data/lib/square/types/create_vendor_response.rb +11 -0
  696. data/lib/square/types/create_webhook_subscription_response.rb +15 -0
  697. data/lib/square/types/currency.rb +192 -0
  698. data/lib/square/types/custom_attribute.rb +17 -0
  699. data/lib/square/types/custom_attribute_definition.rb +20 -0
  700. data/lib/square/types/custom_attribute_definition_event_data.rb +13 -0
  701. data/lib/square/types/custom_attribute_definition_event_data_object.rb +11 -0
  702. data/lib/square/types/custom_attribute_definition_visibility.rb +12 -0
  703. data/lib/square/types/custom_attribute_event_data.rb +11 -0
  704. data/lib/square/types/custom_attribute_event_data_object.rb +9 -0
  705. data/lib/square/types/custom_attribute_filter.rb +17 -0
  706. data/lib/square/types/custom_field.rb +12 -0
  707. data/lib/square/types/customer.rb +28 -0
  708. data/lib/square/types/customer_address_filter.rb +12 -0
  709. data/lib/square/types/customer_created_event.rb +17 -0
  710. data/lib/square/types/customer_created_event_data.rb +12 -0
  711. data/lib/square/types/customer_created_event_event_context.rb +10 -0
  712. data/lib/square/types/customer_created_event_event_context_merge.rb +11 -0
  713. data/lib/square/types/customer_created_event_object.rb +11 -0
  714. data/lib/square/types/customer_creation_source.rb +28 -0
  715. data/lib/square/types/customer_creation_source_filter.rb +16 -0
  716. data/lib/square/types/customer_custom_attribute_definition_created_event.rb +18 -0
  717. data/lib/square/types/customer_custom_attribute_definition_created_public_event.rb +20 -0
  718. data/lib/square/types/customer_custom_attribute_definition_deleted_event.rb +19 -0
  719. data/lib/square/types/customer_custom_attribute_definition_deleted_public_event.rb +20 -0
  720. data/lib/square/types/customer_custom_attribute_definition_owned_created_event.rb +15 -0
  721. data/lib/square/types/customer_custom_attribute_definition_owned_deleted_event.rb +16 -0
  722. data/lib/square/types/customer_custom_attribute_definition_owned_updated_event.rb +16 -0
  723. data/lib/square/types/customer_custom_attribute_definition_updated_event.rb +19 -0
  724. data/lib/square/types/customer_custom_attribute_definition_updated_public_event.rb +20 -0
  725. data/lib/square/types/customer_custom_attribute_definition_visible_created_event.rb +17 -0
  726. data/lib/square/types/customer_custom_attribute_definition_visible_deleted_event.rb +18 -0
  727. data/lib/square/types/customer_custom_attribute_definition_visible_updated_event.rb +18 -0
  728. data/lib/square/types/customer_custom_attribute_deleted_event.rb +20 -0
  729. data/lib/square/types/customer_custom_attribute_deleted_public_event.rb +20 -0
  730. data/lib/square/types/customer_custom_attribute_filter.rb +13 -0
  731. data/lib/square/types/customer_custom_attribute_filter_value.rb +18 -0
  732. data/lib/square/types/customer_custom_attribute_filters.rb +14 -0
  733. data/lib/square/types/customer_custom_attribute_owned_deleted_event.rb +17 -0
  734. data/lib/square/types/customer_custom_attribute_owned_updated_event.rb +17 -0
  735. data/lib/square/types/customer_custom_attribute_updated_event.rb +20 -0
  736. data/lib/square/types/customer_custom_attribute_updated_public_event.rb +20 -0
  737. data/lib/square/types/customer_custom_attribute_visible_deleted_event.rb +22 -0
  738. data/lib/square/types/customer_custom_attribute_visible_updated_event.rb +22 -0
  739. data/lib/square/types/customer_deleted_event.rb +16 -0
  740. data/lib/square/types/customer_deleted_event_data.rb +12 -0
  741. data/lib/square/types/customer_deleted_event_event_context.rb +10 -0
  742. data/lib/square/types/customer_deleted_event_event_context_merge.rb +11 -0
  743. data/lib/square/types/customer_deleted_event_object.rb +11 -0
  744. data/lib/square/types/customer_details.rb +11 -0
  745. data/lib/square/types/customer_filter.rb +19 -0
  746. data/lib/square/types/customer_group.rb +16 -0
  747. data/lib/square/types/customer_inclusion_exclusion.rb +11 -0
  748. data/lib/square/types/customer_preferences.rb +10 -0
  749. data/lib/square/types/customer_query.rb +11 -0
  750. data/lib/square/types/customer_segment.rb +16 -0
  751. data/lib/square/types/customer_sort.rb +12 -0
  752. data/lib/square/types/customer_sort_field.rb +11 -0
  753. data/lib/square/types/customer_tax_ids.rb +11 -0
  754. data/lib/square/types/customer_text_filter.rb +13 -0
  755. data/lib/square/types/customer_updated_event.rb +16 -0
  756. data/lib/square/types/customer_updated_event_data.rb +12 -0
  757. data/lib/square/types/customer_updated_event_object.rb +10 -0
  758. data/lib/square/types/data_collection_options.rb +12 -0
  759. data/lib/square/types/data_collection_options_input_type.rb +11 -0
  760. data/lib/square/types/date_range.rb +12 -0
  761. data/lib/square/types/day_of_week.rb +16 -0
  762. data/lib/square/types/delete_booking_custom_attribute_definition_response.rb +11 -0
  763. data/lib/square/types/delete_booking_custom_attribute_response.rb +11 -0
  764. data/lib/square/types/delete_break_type_response.rb +11 -0
  765. data/lib/square/types/delete_catalog_object_response.rb +11 -0
  766. data/lib/square/types/delete_customer_card_response.rb +11 -0
  767. data/lib/square/types/delete_customer_custom_attribute_definition_response.rb +10 -0
  768. data/lib/square/types/delete_customer_custom_attribute_response.rb +11 -0
  769. data/lib/square/types/delete_customer_group_response.rb +11 -0
  770. data/lib/square/types/delete_customer_response.rb +11 -0
  771. data/lib/square/types/delete_dispute_evidence_response.rb +10 -0
  772. data/lib/square/types/delete_invoice_attachment_response.rb +10 -0
  773. data/lib/square/types/delete_invoice_response.rb +10 -0
  774. data/lib/square/types/delete_location_custom_attribute_definition_response.rb +10 -0
  775. data/lib/square/types/delete_location_custom_attribute_response.rb +11 -0
  776. data/lib/square/types/delete_loyalty_reward_response.rb +10 -0
  777. data/lib/square/types/delete_merchant_custom_attribute_definition_response.rb +10 -0
  778. data/lib/square/types/delete_merchant_custom_attribute_response.rb +11 -0
  779. data/lib/square/types/delete_order_custom_attribute_definition_response.rb +10 -0
  780. data/lib/square/types/delete_order_custom_attribute_response.rb +10 -0
  781. data/lib/square/types/delete_payment_link_response.rb +11 -0
  782. data/lib/square/types/delete_shift_response.rb +11 -0
  783. data/lib/square/types/delete_snippet_response.rb +10 -0
  784. data/lib/square/types/delete_subscription_action_response.rb +12 -0
  785. data/lib/square/types/delete_timecard_response.rb +11 -0
  786. data/lib/square/types/delete_webhook_subscription_response.rb +11 -0
  787. data/lib/square/types/destination.rb +11 -0
  788. data/lib/square/types/destination_details.rb +14 -0
  789. data/lib/square/types/destination_details_card_refund_details.rb +11 -0
  790. data/lib/square/types/destination_details_cash_refund_details.rb +11 -0
  791. data/lib/square/types/destination_details_external_refund_details.rb +12 -0
  792. data/lib/square/types/destination_type.rb +13 -0
  793. data/lib/square/types/device.rb +12 -0
  794. data/lib/square/types/device_attributes.rb +16 -0
  795. data/lib/square/types/device_checkout_options.rb +13 -0
  796. data/lib/square/types/device_code.rb +19 -0
  797. data/lib/square/types/device_code_paired_event.rb +17 -0
  798. data/lib/square/types/device_code_paired_event_data.rb +11 -0
  799. data/lib/square/types/device_code_paired_event_object.rb +9 -0
  800. data/lib/square/types/device_code_status.rb +13 -0
  801. data/lib/square/types/device_component_details_application_details.rb +12 -0
  802. data/lib/square/types/device_component_details_battery_details.rb +10 -0
  803. data/lib/square/types/device_component_details_card_reader_details.rb +9 -0
  804. data/lib/square/types/device_component_details_ethernet_details.rb +10 -0
  805. data/lib/square/types/device_component_details_external_power.rb +13 -0
  806. data/lib/square/types/device_component_details_measurement.rb +10 -0
  807. data/lib/square/types/device_component_details_wi_fi_details.rb +13 -0
  808. data/lib/square/types/device_created_event.rb +14 -0
  809. data/lib/square/types/device_created_event_data.rb +11 -0
  810. data/lib/square/types/device_created_event_object.rb +9 -0
  811. data/lib/square/types/device_details.rb +12 -0
  812. data/lib/square/types/device_metadata.rb +20 -0
  813. data/lib/square/types/device_status.rb +9 -0
  814. data/lib/square/types/device_status_category.rb +12 -0
  815. data/lib/square/types/digital_wallet_details.rb +12 -0
  816. data/lib/square/types/disable_card_response.rb +15 -0
  817. data/lib/square/types/disable_events_response.rb +14 -0
  818. data/lib/square/types/dismiss_terminal_action_response.rb +10 -0
  819. data/lib/square/types/dismiss_terminal_checkout_response.rb +10 -0
  820. data/lib/square/types/dismiss_terminal_refund_response.rb +10 -0
  821. data/lib/square/types/dispute.rb +25 -0
  822. data/lib/square/types/dispute_created_event.rb +15 -0
  823. data/lib/square/types/dispute_created_event_data.rb +11 -0
  824. data/lib/square/types/dispute_created_event_object.rb +9 -0
  825. data/lib/square/types/dispute_evidence.rb +15 -0
  826. data/lib/square/types/dispute_evidence_added_event.rb +17 -0
  827. data/lib/square/types/dispute_evidence_added_event_data.rb +11 -0
  828. data/lib/square/types/dispute_evidence_added_event_object.rb +9 -0
  829. data/lib/square/types/dispute_evidence_created_event.rb +17 -0
  830. data/lib/square/types/dispute_evidence_created_event_data.rb +11 -0
  831. data/lib/square/types/dispute_evidence_created_event_object.rb +9 -0
  832. data/lib/square/types/dispute_evidence_deleted_event.rb +17 -0
  833. data/lib/square/types/dispute_evidence_deleted_event_data.rb +11 -0
  834. data/lib/square/types/dispute_evidence_deleted_event_object.rb +9 -0
  835. data/lib/square/types/dispute_evidence_file.rb +11 -0
  836. data/lib/square/types/dispute_evidence_removed_event.rb +17 -0
  837. data/lib/square/types/dispute_evidence_removed_event_data.rb +11 -0
  838. data/lib/square/types/dispute_evidence_removed_event_object.rb +9 -0
  839. data/lib/square/types/dispute_evidence_type.rb +24 -0
  840. data/lib/square/types/dispute_reason.rb +18 -0
  841. data/lib/square/types/dispute_state.rb +17 -0
  842. data/lib/square/types/dispute_state_changed_event.rb +17 -0
  843. data/lib/square/types/dispute_state_changed_event_data.rb +11 -0
  844. data/lib/square/types/dispute_state_changed_event_object.rb +9 -0
  845. data/lib/square/types/dispute_state_updated_event.rb +17 -0
  846. data/lib/square/types/dispute_state_updated_event_data.rb +11 -0
  847. data/lib/square/types/dispute_state_updated_event_object.rb +9 -0
  848. data/lib/square/types/disputed_payment.rb +10 -0
  849. data/lib/square/types/ecom_visibility.rb +13 -0
  850. data/lib/square/types/employee.rb +21 -0
  851. data/lib/square/types/employee_status.rb +11 -0
  852. data/lib/square/types/employee_wage.rb +13 -0
  853. data/lib/square/types/enable_events_response.rb +14 -0
  854. data/lib/square/types/error.rb +15 -0
  855. data/lib/square/types/error_category.rb +17 -0
  856. data/lib/square/types/error_code.rb +162 -0
  857. data/lib/square/types/event.rb +14 -0
  858. data/lib/square/types/event_data.rb +14 -0
  859. data/lib/square/types/event_metadata.rb +11 -0
  860. data/lib/square/types/event_type_metadata.rb +12 -0
  861. data/lib/square/types/exclude_strategy.rb +11 -0
  862. data/lib/square/types/external_payment_details.rb +15 -0
  863. data/lib/square/types/filter_value.rb +16 -0
  864. data/lib/square/types/float_number_range.rb +11 -0
  865. data/lib/square/types/fulfillment.rb +24 -0
  866. data/lib/square/types/fulfillment_delivery_details.rb +34 -0
  867. data/lib/square/types/fulfillment_delivery_details_order_fulfillment_delivery_details_schedule_type.rb +11 -0
  868. data/lib/square/types/fulfillment_fulfillment_entry.rb +15 -0
  869. data/lib/square/types/fulfillment_fulfillment_line_item_application.rb +11 -0
  870. data/lib/square/types/fulfillment_pickup_details.rb +29 -0
  871. data/lib/square/types/fulfillment_pickup_details_curbside_pickup_details.rb +11 -0
  872. data/lib/square/types/fulfillment_pickup_details_schedule_type.rb +11 -0
  873. data/lib/square/types/fulfillment_recipient.rb +14 -0
  874. data/lib/square/types/fulfillment_shipment_details.rb +24 -0
  875. data/lib/square/types/fulfillment_state.rb +15 -0
  876. data/lib/square/types/fulfillment_type.rb +12 -0
  877. data/lib/square/types/get_bank_account_by_v_1_id_response.rb +11 -0
  878. data/lib/square/types/get_bank_account_response.rb +11 -0
  879. data/lib/square/types/get_booking_response.rb +10 -0
  880. data/lib/square/types/get_break_type_response.rb +13 -0
  881. data/lib/square/types/get_business_booking_profile_response.rb +10 -0
  882. data/lib/square/types/get_card_response.rb +15 -0
  883. data/lib/square/types/get_cash_drawer_shift_response.rb +10 -0
  884. data/lib/square/types/get_catalog_object_response.rb +13 -0
  885. data/lib/square/types/get_customer_custom_attribute_definition_response.rb +14 -0
  886. data/lib/square/types/get_customer_custom_attribute_response.rb +12 -0
  887. data/lib/square/types/get_customer_group_response.rb +14 -0
  888. data/lib/square/types/get_customer_response.rb +14 -0
  889. data/lib/square/types/get_customer_segment_response.rb +13 -0
  890. data/lib/square/types/get_device_code_response.rb +10 -0
  891. data/lib/square/types/get_device_response.rb +10 -0
  892. data/lib/square/types/get_dispute_evidence_response.rb +11 -0
  893. data/lib/square/types/get_dispute_response.rb +11 -0
  894. data/lib/square/types/get_employee_response.rb +10 -0
  895. data/lib/square/types/get_employee_wage_response.rb +13 -0
  896. data/lib/square/types/get_gift_card_from_gan_response.rb +12 -0
  897. data/lib/square/types/get_gift_card_from_nonce_response.rb +12 -0
  898. data/lib/square/types/get_gift_card_response.rb +12 -0
  899. data/lib/square/types/get_inventory_adjustment_response.rb +10 -0
  900. data/lib/square/types/get_inventory_changes_response.rb +11 -0
  901. data/lib/square/types/get_inventory_count_response.rb +11 -0
  902. data/lib/square/types/get_inventory_physical_count_response.rb +10 -0
  903. data/lib/square/types/get_inventory_transfer_response.rb +10 -0
  904. data/lib/square/types/get_invoice_response.rb +11 -0
  905. data/lib/square/types/get_location_response.rb +12 -0
  906. data/lib/square/types/get_loyalty_account_response.rb +11 -0
  907. data/lib/square/types/get_loyalty_program_response.rb +11 -0
  908. data/lib/square/types/get_loyalty_promotion_response.rb +11 -0
  909. data/lib/square/types/get_loyalty_reward_response.rb +11 -0
  910. data/lib/square/types/get_merchant_response.rb +11 -0
  911. data/lib/square/types/get_order_response.rb +10 -0
  912. data/lib/square/types/get_payment_link_response.rb +10 -0
  913. data/lib/square/types/get_payment_refund_response.rb +14 -0
  914. data/lib/square/types/get_payment_response.rb +11 -0
  915. data/lib/square/types/get_payout_response.rb +10 -0
  916. data/lib/square/types/get_shift_response.rb +13 -0
  917. data/lib/square/types/get_snippet_response.rb +11 -0
  918. data/lib/square/types/get_subscription_response.rb +12 -0
  919. data/lib/square/types/get_team_member_booking_profile_response.rb +12 -0
  920. data/lib/square/types/get_team_member_response.rb +11 -0
  921. data/lib/square/types/get_team_member_wage_response.rb +13 -0
  922. data/lib/square/types/get_terminal_action_response.rb +10 -0
  923. data/lib/square/types/get_terminal_checkout_response.rb +10 -0
  924. data/lib/square/types/get_terminal_refund_response.rb +10 -0
  925. data/lib/square/types/get_transaction_response.rb +14 -0
  926. data/lib/square/types/get_vendor_response.rb +11 -0
  927. data/lib/square/types/get_wage_setting_response.rb +11 -0
  928. data/lib/square/types/get_webhook_subscription_response.rb +15 -0
  929. data/lib/square/types/gift_card.rb +17 -0
  930. data/lib/square/types/gift_card_activity.rb +49 -0
  931. data/lib/square/types/gift_card_activity_activate.rb +14 -0
  932. data/lib/square/types/gift_card_activity_adjust_decrement.rb +11 -0
  933. data/lib/square/types/gift_card_activity_adjust_decrement_reason.rb +13 -0
  934. data/lib/square/types/gift_card_activity_adjust_increment.rb +11 -0
  935. data/lib/square/types/gift_card_activity_adjust_increment_reason.rb +12 -0
  936. data/lib/square/types/gift_card_activity_block.rb +10 -0
  937. data/lib/square/types/gift_card_activity_clear_balance.rb +10 -0
  938. data/lib/square/types/gift_card_activity_clear_balance_reason.rb +12 -0
  939. data/lib/square/types/gift_card_activity_created_event.rb +14 -0
  940. data/lib/square/types/gift_card_activity_created_event_data.rb +12 -0
  941. data/lib/square/types/gift_card_activity_created_event_object.rb +11 -0
  942. data/lib/square/types/gift_card_activity_deactivate.rb +10 -0
  943. data/lib/square/types/gift_card_activity_deactivate_reason.rb +12 -0
  944. data/lib/square/types/gift_card_activity_import.rb +12 -0
  945. data/lib/square/types/gift_card_activity_import_reversal.rb +10 -0
  946. data/lib/square/types/gift_card_activity_load.rb +14 -0
  947. data/lib/square/types/gift_card_activity_redeem.rb +13 -0
  948. data/lib/square/types/gift_card_activity_redeem_status.rb +12 -0
  949. data/lib/square/types/gift_card_activity_refund.rb +13 -0
  950. data/lib/square/types/gift_card_activity_transfer_balance_from.rb +11 -0
  951. data/lib/square/types/gift_card_activity_transfer_balance_to.rb +11 -0
  952. data/lib/square/types/gift_card_activity_type.rb +24 -0
  953. data/lib/square/types/gift_card_activity_unblock.rb +10 -0
  954. data/lib/square/types/gift_card_activity_unlinked_activity_refund.rb +12 -0
  955. data/lib/square/types/gift_card_activity_updated_event.rb +18 -0
  956. data/lib/square/types/gift_card_activity_updated_event_data.rb +12 -0
  957. data/lib/square/types/gift_card_activity_updated_event_object.rb +11 -0
  958. data/lib/square/types/gift_card_created_event.rb +14 -0
  959. data/lib/square/types/gift_card_created_event_data.rb +12 -0
  960. data/lib/square/types/gift_card_created_event_object.rb +10 -0
  961. data/lib/square/types/gift_card_customer_linked_event.rb +14 -0
  962. data/lib/square/types/gift_card_customer_linked_event_data.rb +12 -0
  963. data/lib/square/types/gift_card_customer_linked_event_object.rb +12 -0
  964. data/lib/square/types/gift_card_customer_unlinked_event.rb +14 -0
  965. data/lib/square/types/gift_card_customer_unlinked_event_data.rb +12 -0
  966. data/lib/square/types/gift_card_customer_unlinked_event_object.rb +12 -0
  967. data/lib/square/types/gift_card_gan_source.rb +11 -0
  968. data/lib/square/types/gift_card_status.rb +13 -0
  969. data/lib/square/types/gift_card_type.rb +11 -0
  970. data/lib/square/types/gift_card_updated_event.rb +15 -0
  971. data/lib/square/types/gift_card_updated_event_data.rb +12 -0
  972. data/lib/square/types/gift_card_updated_event_object.rb +10 -0
  973. data/lib/square/types/inventory_adjustment.rb +29 -0
  974. data/lib/square/types/inventory_adjustment_group.rb +12 -0
  975. data/lib/square/types/inventory_alert_type.rb +11 -0
  976. data/lib/square/types/inventory_change.rb +17 -0
  977. data/lib/square/types/inventory_change_type.rb +12 -0
  978. data/lib/square/types/inventory_count.rb +18 -0
  979. data/lib/square/types/inventory_count_updated_event.rb +15 -0
  980. data/lib/square/types/inventory_count_updated_event_data.rb +11 -0
  981. data/lib/square/types/inventory_count_updated_event_object.rb +11 -0
  982. data/lib/square/types/inventory_physical_count.rb +24 -0
  983. data/lib/square/types/inventory_state.rb +25 -0
  984. data/lib/square/types/inventory_transfer.rb +23 -0
  985. data/lib/square/types/invoice.rb +43 -0
  986. data/lib/square/types/invoice_accepted_payment_methods.rb +14 -0
  987. data/lib/square/types/invoice_attachment.rb +16 -0
  988. data/lib/square/types/invoice_automatic_payment_source.rb +12 -0
  989. data/lib/square/types/invoice_canceled_event.rb +14 -0
  990. data/lib/square/types/invoice_canceled_event_data.rb +11 -0
  991. data/lib/square/types/invoice_canceled_event_object.rb +9 -0
  992. data/lib/square/types/invoice_created_event.rb +14 -0
  993. data/lib/square/types/invoice_created_event_data.rb +11 -0
  994. data/lib/square/types/invoice_created_event_object.rb +9 -0
  995. data/lib/square/types/invoice_custom_field.rb +16 -0
  996. data/lib/square/types/invoice_custom_field_placement.rb +11 -0
  997. data/lib/square/types/invoice_deleted_event.rb +14 -0
  998. data/lib/square/types/invoice_deleted_event_data.rb +11 -0
  999. data/lib/square/types/invoice_delivery_method.rb +12 -0
  1000. data/lib/square/types/invoice_filter.rb +11 -0
  1001. data/lib/square/types/invoice_payment_made_event.rb +15 -0
  1002. data/lib/square/types/invoice_payment_made_event_data.rb +11 -0
  1003. data/lib/square/types/invoice_payment_made_event_object.rb +9 -0
  1004. data/lib/square/types/invoice_payment_reminder.rb +16 -0
  1005. data/lib/square/types/invoice_payment_reminder_status.rb +12 -0
  1006. data/lib/square/types/invoice_payment_request.rb +31 -0
  1007. data/lib/square/types/invoice_published_event.rb +14 -0
  1008. data/lib/square/types/invoice_published_event_data.rb +11 -0
  1009. data/lib/square/types/invoice_published_event_object.rb +9 -0
  1010. data/lib/square/types/invoice_query.rb +11 -0
  1011. data/lib/square/types/invoice_recipient.rb +22 -0
  1012. data/lib/square/types/invoice_recipient_tax_ids.rb +12 -0
  1013. data/lib/square/types/invoice_refunded_event.rb +15 -0
  1014. data/lib/square/types/invoice_refunded_event_data.rb +11 -0
  1015. data/lib/square/types/invoice_refunded_event_object.rb +9 -0
  1016. data/lib/square/types/invoice_request_method.rb +16 -0
  1017. data/lib/square/types/invoice_request_type.rb +12 -0
  1018. data/lib/square/types/invoice_scheduled_charge_failed_event.rb +14 -0
  1019. data/lib/square/types/invoice_scheduled_charge_failed_event_data.rb +11 -0
  1020. data/lib/square/types/invoice_scheduled_charge_failed_event_object.rb +9 -0
  1021. data/lib/square/types/invoice_sort.rb +11 -0
  1022. data/lib/square/types/invoice_status.rb +19 -0
  1023. data/lib/square/types/invoice_updated_event.rb +14 -0
  1024. data/lib/square/types/invoice_updated_event_data.rb +11 -0
  1025. data/lib/square/types/invoice_updated_event_object.rb +9 -0
  1026. data/lib/square/types/item_variation_location_overrides.rb +17 -0
  1027. data/lib/square/types/job.rb +17 -0
  1028. data/lib/square/types/job_assignment.rb +16 -0
  1029. data/lib/square/types/job_assignment_pay_type.rb +12 -0
  1030. data/lib/square/types/job_created_event.rb +14 -0
  1031. data/lib/square/types/job_created_event_data.rb +11 -0
  1032. data/lib/square/types/job_created_event_object.rb +9 -0
  1033. data/lib/square/types/job_updated_event.rb +14 -0
  1034. data/lib/square/types/job_updated_event_data.rb +11 -0
  1035. data/lib/square/types/job_updated_event_object.rb +9 -0
  1036. data/lib/square/types/labor_scheduled_shift_created_event.rb +15 -0
  1037. data/lib/square/types/labor_scheduled_shift_created_event_data.rb +11 -0
  1038. data/lib/square/types/labor_scheduled_shift_created_event_object.rb +9 -0
  1039. data/lib/square/types/labor_scheduled_shift_deleted_event.rb +15 -0
  1040. data/lib/square/types/labor_scheduled_shift_deleted_event_data.rb +11 -0
  1041. data/lib/square/types/labor_scheduled_shift_published_event.rb +15 -0
  1042. data/lib/square/types/labor_scheduled_shift_published_event_data.rb +11 -0
  1043. data/lib/square/types/labor_scheduled_shift_published_event_object.rb +9 -0
  1044. data/lib/square/types/labor_scheduled_shift_updated_event.rb +15 -0
  1045. data/lib/square/types/labor_scheduled_shift_updated_event_data.rb +11 -0
  1046. data/lib/square/types/labor_scheduled_shift_updated_event_object.rb +9 -0
  1047. data/lib/square/types/labor_shift_created_event.rb +16 -0
  1048. data/lib/square/types/labor_shift_created_event_data.rb +11 -0
  1049. data/lib/square/types/labor_shift_created_event_object.rb +9 -0
  1050. data/lib/square/types/labor_shift_deleted_event.rb +16 -0
  1051. data/lib/square/types/labor_shift_deleted_event_data.rb +11 -0
  1052. data/lib/square/types/labor_shift_updated_event.rb +16 -0
  1053. data/lib/square/types/labor_shift_updated_event_data.rb +11 -0
  1054. data/lib/square/types/labor_shift_updated_event_object.rb +9 -0
  1055. data/lib/square/types/labor_timecard_created_event.rb +14 -0
  1056. data/lib/square/types/labor_timecard_created_event_data.rb +11 -0
  1057. data/lib/square/types/labor_timecard_created_event_object.rb +9 -0
  1058. data/lib/square/types/labor_timecard_deleted_event.rb +14 -0
  1059. data/lib/square/types/labor_timecard_deleted_event_data.rb +11 -0
  1060. data/lib/square/types/labor_timecard_updated_event.rb +14 -0
  1061. data/lib/square/types/labor_timecard_updated_event_data.rb +11 -0
  1062. data/lib/square/types/labor_timecard_updated_event_object.rb +9 -0
  1063. data/lib/square/types/link_customer_to_gift_card_response.rb +12 -0
  1064. data/lib/square/types/list_bank_accounts_response.rb +12 -0
  1065. data/lib/square/types/list_booking_custom_attribute_definitions_response.rb +16 -0
  1066. data/lib/square/types/list_booking_custom_attributes_response.rb +16 -0
  1067. data/lib/square/types/list_bookings_response.rb +11 -0
  1068. data/lib/square/types/list_break_types_response.rb +14 -0
  1069. data/lib/square/types/list_cards_response.rb +16 -0
  1070. data/lib/square/types/list_cash_drawer_shift_events_response.rb +13 -0
  1071. data/lib/square/types/list_cash_drawer_shifts_response.rb +13 -0
  1072. data/lib/square/types/list_catalog_response.rb +11 -0
  1073. data/lib/square/types/list_customer_custom_attribute_definitions_response.rb +16 -0
  1074. data/lib/square/types/list_customer_custom_attributes_response.rb +16 -0
  1075. data/lib/square/types/list_customer_groups_response.rb +15 -0
  1076. data/lib/square/types/list_customer_segments_response.rb +14 -0
  1077. data/lib/square/types/list_customers_response.rb +16 -0
  1078. data/lib/square/types/list_device_codes_response.rb +11 -0
  1079. data/lib/square/types/list_devices_response.rb +11 -0
  1080. data/lib/square/types/list_dispute_evidence_response.rb +12 -0
  1081. data/lib/square/types/list_disputes_response.rb +12 -0
  1082. data/lib/square/types/list_employee_wages_response.rb +13 -0
  1083. data/lib/square/types/list_employees_response.rb +11 -0
  1084. data/lib/square/types/list_event_types_response.rb +16 -0
  1085. data/lib/square/types/list_gift_card_activities_response.rb +15 -0
  1086. data/lib/square/types/list_gift_cards_response.rb +13 -0
  1087. data/lib/square/types/list_invoices_response.rb +12 -0
  1088. data/lib/square/types/list_jobs_response.rb +13 -0
  1089. data/lib/square/types/list_location_booking_profiles_response.rb +13 -0
  1090. data/lib/square/types/list_location_custom_attribute_definitions_response.rb +16 -0
  1091. data/lib/square/types/list_location_custom_attributes_response.rb +16 -0
  1092. data/lib/square/types/list_locations_response.rb +14 -0
  1093. data/lib/square/types/list_loyalty_programs_response.rb +11 -0
  1094. data/lib/square/types/list_loyalty_promotions_response.rb +16 -0
  1095. data/lib/square/types/list_merchant_custom_attribute_definitions_response.rb +16 -0
  1096. data/lib/square/types/list_merchant_custom_attributes_response.rb +16 -0
  1097. data/lib/square/types/list_merchants_response.rb +12 -0
  1098. data/lib/square/types/list_order_custom_attribute_definitions_response.rb +14 -0
  1099. data/lib/square/types/list_order_custom_attributes_response.rb +14 -0
  1100. data/lib/square/types/list_payment_links_response.rb +11 -0
  1101. data/lib/square/types/list_payment_refunds_request_sort_field.rb +11 -0
  1102. data/lib/square/types/list_payment_refunds_response.rb +14 -0
  1103. data/lib/square/types/list_payments_request_sort_field.rb +12 -0
  1104. data/lib/square/types/list_payments_response.rb +12 -0
  1105. data/lib/square/types/list_payout_entries_response.rb +12 -0
  1106. data/lib/square/types/list_payouts_response.rb +12 -0
  1107. data/lib/square/types/list_sites_response.rb +11 -0
  1108. data/lib/square/types/list_subscription_events_response.rb +15 -0
  1109. data/lib/square/types/list_team_member_booking_profiles_response.rb +13 -0
  1110. data/lib/square/types/list_team_member_wages_response.rb +15 -0
  1111. data/lib/square/types/list_transactions_response.rb +15 -0
  1112. data/lib/square/types/list_webhook_event_types_response.rb +16 -0
  1113. data/lib/square/types/list_webhook_subscriptions_response.rb +18 -0
  1114. data/lib/square/types/list_workweek_configs_response.rb +16 -0
  1115. data/lib/square/types/location.rb +38 -0
  1116. data/lib/square/types/location_booking_profile.rb +12 -0
  1117. data/lib/square/types/location_capability.rb +12 -0
  1118. data/lib/square/types/location_created_event.rb +15 -0
  1119. data/lib/square/types/location_created_event_data.rb +10 -0
  1120. data/lib/square/types/location_custom_attribute_definition_owned_created_event.rb +15 -0
  1121. data/lib/square/types/location_custom_attribute_definition_owned_deleted_event.rb +16 -0
  1122. data/lib/square/types/location_custom_attribute_definition_owned_updated_event.rb +16 -0
  1123. data/lib/square/types/location_custom_attribute_definition_visible_created_event.rb +17 -0
  1124. data/lib/square/types/location_custom_attribute_definition_visible_deleted_event.rb +18 -0
  1125. data/lib/square/types/location_custom_attribute_definition_visible_updated_event.rb +18 -0
  1126. data/lib/square/types/location_custom_attribute_owned_deleted_event.rb +17 -0
  1127. data/lib/square/types/location_custom_attribute_owned_updated_event.rb +17 -0
  1128. data/lib/square/types/location_custom_attribute_visible_deleted_event.rb +22 -0
  1129. data/lib/square/types/location_custom_attribute_visible_updated_event.rb +22 -0
  1130. data/lib/square/types/location_settings_updated_event.rb +14 -0
  1131. data/lib/square/types/location_settings_updated_event_data.rb +11 -0
  1132. data/lib/square/types/location_settings_updated_event_object.rb +9 -0
  1133. data/lib/square/types/location_status.rb +11 -0
  1134. data/lib/square/types/location_type.rb +11 -0
  1135. data/lib/square/types/location_updated_event.rb +15 -0
  1136. data/lib/square/types/location_updated_event_data.rb +10 -0
  1137. data/lib/square/types/loyalty_account.rb +22 -0
  1138. data/lib/square/types/loyalty_account_created_event.rb +14 -0
  1139. data/lib/square/types/loyalty_account_created_event_data.rb +12 -0
  1140. data/lib/square/types/loyalty_account_created_event_object.rb +9 -0
  1141. data/lib/square/types/loyalty_account_deleted_event.rb +14 -0
  1142. data/lib/square/types/loyalty_account_deleted_event_data.rb +12 -0
  1143. data/lib/square/types/loyalty_account_deleted_event_object.rb +9 -0
  1144. data/lib/square/types/loyalty_account_expiring_point_deadline.rb +11 -0
  1145. data/lib/square/types/loyalty_account_mapping.rb +15 -0
  1146. data/lib/square/types/loyalty_account_updated_event.rb +14 -0
  1147. data/lib/square/types/loyalty_account_updated_event_data.rb +12 -0
  1148. data/lib/square/types/loyalty_account_updated_event_object.rb +9 -0
  1149. data/lib/square/types/loyalty_event.rb +26 -0
  1150. data/lib/square/types/loyalty_event_accumulate_points.rb +12 -0
  1151. data/lib/square/types/loyalty_event_accumulate_promotion_points.rb +13 -0
  1152. data/lib/square/types/loyalty_event_adjust_points.rb +12 -0
  1153. data/lib/square/types/loyalty_event_create_reward.rb +12 -0
  1154. data/lib/square/types/loyalty_event_created_event.rb +14 -0
  1155. data/lib/square/types/loyalty_event_created_event_data.rb +12 -0
  1156. data/lib/square/types/loyalty_event_created_event_object.rb +9 -0
  1157. data/lib/square/types/loyalty_event_date_time_filter.rb +10 -0
  1158. data/lib/square/types/loyalty_event_delete_reward.rb +12 -0
  1159. data/lib/square/types/loyalty_event_expire_points.rb +11 -0
  1160. data/lib/square/types/loyalty_event_filter.rb +17 -0
  1161. data/lib/square/types/loyalty_event_location_filter.rb +10 -0
  1162. data/lib/square/types/loyalty_event_loyalty_account_filter.rb +10 -0
  1163. data/lib/square/types/loyalty_event_order_filter.rb +10 -0
  1164. data/lib/square/types/loyalty_event_other.rb +11 -0
  1165. data/lib/square/types/loyalty_event_query.rb +10 -0
  1166. data/lib/square/types/loyalty_event_redeem_reward.rb +12 -0
  1167. data/lib/square/types/loyalty_event_source.rb +11 -0
  1168. data/lib/square/types/loyalty_event_type.rb +17 -0
  1169. data/lib/square/types/loyalty_event_type_filter.rb +10 -0
  1170. data/lib/square/types/loyalty_program.rb +24 -0
  1171. data/lib/square/types/loyalty_program_accrual_rule.rb +17 -0
  1172. data/lib/square/types/loyalty_program_accrual_rule_category_data.rb +10 -0
  1173. data/lib/square/types/loyalty_program_accrual_rule_item_variation_data.rb +10 -0
  1174. data/lib/square/types/loyalty_program_accrual_rule_spend_data.rb +13 -0
  1175. data/lib/square/types/loyalty_program_accrual_rule_tax_mode.rb +11 -0
  1176. data/lib/square/types/loyalty_program_accrual_rule_type.rb +13 -0
  1177. data/lib/square/types/loyalty_program_accrual_rule_visit_data.rb +11 -0
  1178. data/lib/square/types/loyalty_program_created_event.rb +14 -0
  1179. data/lib/square/types/loyalty_program_created_event_data.rb +12 -0
  1180. data/lib/square/types/loyalty_program_created_event_object.rb +10 -0
  1181. data/lib/square/types/loyalty_program_expiration_policy.rb +10 -0
  1182. data/lib/square/types/loyalty_program_reward_tier.rb +14 -0
  1183. data/lib/square/types/loyalty_program_status.rb +11 -0
  1184. data/lib/square/types/loyalty_program_terminology.rb +11 -0
  1185. data/lib/square/types/loyalty_program_updated_event.rb +14 -0
  1186. data/lib/square/types/loyalty_program_updated_event_data.rb +12 -0
  1187. data/lib/square/types/loyalty_program_updated_event_object.rb +10 -0
  1188. data/lib/square/types/loyalty_promotion.rb +25 -0
  1189. data/lib/square/types/loyalty_promotion_available_time_data.rb +13 -0
  1190. data/lib/square/types/loyalty_promotion_created_event.rb +14 -0
  1191. data/lib/square/types/loyalty_promotion_created_event_data.rb +12 -0
  1192. data/lib/square/types/loyalty_promotion_created_event_object.rb +10 -0
  1193. data/lib/square/types/loyalty_promotion_incentive.rb +18 -0
  1194. data/lib/square/types/loyalty_promotion_incentive_points_addition_data.rb +10 -0
  1195. data/lib/square/types/loyalty_promotion_incentive_points_multiplier_data.rb +11 -0
  1196. data/lib/square/types/loyalty_promotion_incentive_type.rb +11 -0
  1197. data/lib/square/types/loyalty_promotion_status.rb +13 -0
  1198. data/lib/square/types/loyalty_promotion_trigger_limit.rb +15 -0
  1199. data/lib/square/types/loyalty_promotion_trigger_limit_interval.rb +11 -0
  1200. data/lib/square/types/loyalty_promotion_updated_event.rb +15 -0
  1201. data/lib/square/types/loyalty_promotion_updated_event_data.rb +12 -0
  1202. data/lib/square/types/loyalty_promotion_updated_event_object.rb +10 -0
  1203. data/lib/square/types/loyalty_reward.rb +19 -0
  1204. data/lib/square/types/loyalty_reward_status.rb +12 -0
  1205. data/lib/square/types/measurement_unit.rb +19 -0
  1206. data/lib/square/types/measurement_unit_area.rb +17 -0
  1207. data/lib/square/types/measurement_unit_custom.rb +11 -0
  1208. data/lib/square/types/measurement_unit_length.rb +17 -0
  1209. data/lib/square/types/measurement_unit_time.rb +14 -0
  1210. data/lib/square/types/measurement_unit_unit_type.rb +15 -0
  1211. data/lib/square/types/measurement_unit_volume.rb +20 -0
  1212. data/lib/square/types/measurement_unit_weight.rb +15 -0
  1213. data/lib/square/types/merchant.rb +17 -0
  1214. data/lib/square/types/merchant_custom_attribute_definition_owned_created_event.rb +16 -0
  1215. data/lib/square/types/merchant_custom_attribute_definition_owned_deleted_event.rb +16 -0
  1216. data/lib/square/types/merchant_custom_attribute_definition_owned_updated_event.rb +16 -0
  1217. data/lib/square/types/merchant_custom_attribute_definition_visible_created_event.rb +17 -0
  1218. data/lib/square/types/merchant_custom_attribute_definition_visible_deleted_event.rb +17 -0
  1219. data/lib/square/types/merchant_custom_attribute_definition_visible_updated_event.rb +17 -0
  1220. data/lib/square/types/merchant_custom_attribute_owned_deleted_event.rb +17 -0
  1221. data/lib/square/types/merchant_custom_attribute_owned_updated_event.rb +17 -0
  1222. data/lib/square/types/merchant_custom_attribute_visible_deleted_event.rb +17 -0
  1223. data/lib/square/types/merchant_custom_attribute_visible_updated_event.rb +17 -0
  1224. data/lib/square/types/merchant_settings_updated_event.rb +14 -0
  1225. data/lib/square/types/merchant_settings_updated_event_data.rb +11 -0
  1226. data/lib/square/types/merchant_settings_updated_event_object.rb +9 -0
  1227. data/lib/square/types/merchant_status.rb +11 -0
  1228. data/lib/square/types/modifier_location_overrides.rb +12 -0
  1229. data/lib/square/types/money.rb +16 -0
  1230. data/lib/square/types/oauth_authorization_revoked_event.rb +14 -0
  1231. data/lib/square/types/oauth_authorization_revoked_event_data.rb +11 -0
  1232. data/lib/square/types/oauth_authorization_revoked_event_object.rb +11 -0
  1233. data/lib/square/types/oauth_authorization_revoked_event_revocation_object.rb +12 -0
  1234. data/lib/square/types/oauth_authorization_revoked_event_revoker_type.rb +12 -0
  1235. data/lib/square/types/obtain_token_response.rb +20 -0
  1236. data/lib/square/types/offline_payment_details.rb +10 -0
  1237. data/lib/square/types/order.rb +49 -0
  1238. data/lib/square/types/order_created.rb +13 -0
  1239. data/lib/square/types/order_created_event.rb +17 -0
  1240. data/lib/square/types/order_created_event_data.rb +11 -0
  1241. data/lib/square/types/order_created_object.rb +9 -0
  1242. data/lib/square/types/order_custom_attribute_definition_owned_created_event.rb +14 -0
  1243. data/lib/square/types/order_custom_attribute_definition_owned_deleted_event.rb +14 -0
  1244. data/lib/square/types/order_custom_attribute_definition_owned_updated_event.rb +14 -0
  1245. data/lib/square/types/order_custom_attribute_definition_visible_created_event.rb +14 -0
  1246. data/lib/square/types/order_custom_attribute_definition_visible_deleted_event.rb +14 -0
  1247. data/lib/square/types/order_custom_attribute_definition_visible_updated_event.rb +14 -0
  1248. data/lib/square/types/order_custom_attribute_owned_deleted_event.rb +14 -0
  1249. data/lib/square/types/order_custom_attribute_owned_updated_event.rb +14 -0
  1250. data/lib/square/types/order_custom_attribute_visible_deleted_event.rb +14 -0
  1251. data/lib/square/types/order_custom_attribute_visible_updated_event.rb +14 -0
  1252. data/lib/square/types/order_entry.rb +13 -0
  1253. data/lib/square/types/order_fulfillment_delivery_details_schedule_type.rb +11 -0
  1254. data/lib/square/types/order_fulfillment_fulfillment_line_item_application.rb +11 -0
  1255. data/lib/square/types/order_fulfillment_pickup_details_schedule_type.rb +11 -0
  1256. data/lib/square/types/order_fulfillment_state.rb +15 -0
  1257. data/lib/square/types/order_fulfillment_type.rb +12 -0
  1258. data/lib/square/types/order_fulfillment_updated.rb +17 -0
  1259. data/lib/square/types/order_fulfillment_updated_event.rb +16 -0
  1260. data/lib/square/types/order_fulfillment_updated_event_data.rb +11 -0
  1261. data/lib/square/types/order_fulfillment_updated_object.rb +9 -0
  1262. data/lib/square/types/order_fulfillment_updated_update.rb +12 -0
  1263. data/lib/square/types/order_line_item.rb +40 -0
  1264. data/lib/square/types/order_line_item_applied_discount.rb +17 -0
  1265. data/lib/square/types/order_line_item_applied_service_charge.rb +11 -0
  1266. data/lib/square/types/order_line_item_applied_tax.rb +17 -0
  1267. data/lib/square/types/order_line_item_discount.rb +26 -0
  1268. data/lib/square/types/order_line_item_discount_scope.rb +12 -0
  1269. data/lib/square/types/order_line_item_discount_type.rb +14 -0
  1270. data/lib/square/types/order_line_item_item_type.rb +12 -0
  1271. data/lib/square/types/order_line_item_modifier.rb +17 -0
  1272. data/lib/square/types/order_line_item_pricing_blocklists.rb +17 -0
  1273. data/lib/square/types/order_line_item_pricing_blocklists_blocked_discount.rb +13 -0
  1274. data/lib/square/types/order_line_item_pricing_blocklists_blocked_tax.rb +13 -0
  1275. data/lib/square/types/order_line_item_tax.rb +23 -0
  1276. data/lib/square/types/order_line_item_tax_scope.rb +12 -0
  1277. data/lib/square/types/order_line_item_tax_type.rb +12 -0
  1278. data/lib/square/types/order_money_amounts.rb +14 -0
  1279. data/lib/square/types/order_pricing_options.rb +13 -0
  1280. data/lib/square/types/order_quantity_unit.rb +14 -0
  1281. data/lib/square/types/order_return.rb +24 -0
  1282. data/lib/square/types/order_return_discount.rb +24 -0
  1283. data/lib/square/types/order_return_line_item.rb +38 -0
  1284. data/lib/square/types/order_return_line_item_modifier.rb +17 -0
  1285. data/lib/square/types/order_return_service_charge.rb +28 -0
  1286. data/lib/square/types/order_return_tax.rb +22 -0
  1287. data/lib/square/types/order_return_tip.rb +13 -0
  1288. data/lib/square/types/order_reward.rb +12 -0
  1289. data/lib/square/types/order_rounding_adjustment.rb +13 -0
  1290. data/lib/square/types/order_service_charge.rb +29 -0
  1291. data/lib/square/types/order_service_charge_calculation_phase.rb +13 -0
  1292. data/lib/square/types/order_service_charge_scope.rb +12 -0
  1293. data/lib/square/types/order_service_charge_treatment_type.rb +11 -0
  1294. data/lib/square/types/order_service_charge_type.rb +11 -0
  1295. data/lib/square/types/order_source.rb +10 -0
  1296. data/lib/square/types/order_state.rb +13 -0
  1297. data/lib/square/types/order_updated.rb +14 -0
  1298. data/lib/square/types/order_updated_event.rb +16 -0
  1299. data/lib/square/types/order_updated_event_data.rb +11 -0
  1300. data/lib/square/types/order_updated_object.rb +9 -0
  1301. data/lib/square/types/pause_subscription_response.rb +13 -0
  1302. data/lib/square/types/pay_order_response.rb +12 -0
  1303. data/lib/square/types/payment.rb +55 -0
  1304. data/lib/square/types/payment_balance_activity_app_fee_refund_detail.rb +11 -0
  1305. data/lib/square/types/payment_balance_activity_app_fee_revenue_detail.rb +10 -0
  1306. data/lib/square/types/payment_balance_activity_automatic_savings_detail.rb +10 -0
  1307. data/lib/square/types/payment_balance_activity_automatic_savings_reversed_detail.rb +10 -0
  1308. data/lib/square/types/payment_balance_activity_charge_detail.rb +9 -0
  1309. data/lib/square/types/payment_balance_activity_deposit_fee_detail.rb +9 -0
  1310. data/lib/square/types/payment_balance_activity_deposit_fee_reversed_detail.rb +9 -0
  1311. data/lib/square/types/payment_balance_activity_dispute_detail.rb +10 -0
  1312. data/lib/square/types/payment_balance_activity_fee_detail.rb +9 -0
  1313. data/lib/square/types/payment_balance_activity_free_processing_detail.rb +9 -0
  1314. data/lib/square/types/payment_balance_activity_hold_adjustment_detail.rb +9 -0
  1315. data/lib/square/types/payment_balance_activity_open_dispute_detail.rb +10 -0
  1316. data/lib/square/types/payment_balance_activity_other_adjustment_detail.rb +9 -0
  1317. data/lib/square/types/payment_balance_activity_other_detail.rb +9 -0
  1318. data/lib/square/types/payment_balance_activity_refund_detail.rb +10 -0
  1319. data/lib/square/types/payment_balance_activity_release_adjustment_detail.rb +9 -0
  1320. data/lib/square/types/payment_balance_activity_reserve_hold_detail.rb +9 -0
  1321. data/lib/square/types/payment_balance_activity_reserve_release_detail.rb +9 -0
  1322. data/lib/square/types/payment_balance_activity_square_capital_payment_detail.rb +9 -0
  1323. data/lib/square/types/payment_balance_activity_square_capital_reversed_payment_detail.rb +9 -0
  1324. data/lib/square/types/payment_balance_activity_square_payroll_transfer_detail.rb +9 -0
  1325. data/lib/square/types/payment_balance_activity_square_payroll_transfer_reversed_detail.rb +9 -0
  1326. data/lib/square/types/payment_balance_activity_tax_on_fee_detail.rb +10 -0
  1327. data/lib/square/types/payment_balance_activity_third_party_fee_detail.rb +9 -0
  1328. data/lib/square/types/payment_balance_activity_third_party_fee_refund_detail.rb +10 -0
  1329. data/lib/square/types/payment_created_event.rb +14 -0
  1330. data/lib/square/types/payment_created_event_data.rb +11 -0
  1331. data/lib/square/types/payment_created_event_object.rb +9 -0
  1332. data/lib/square/types/payment_link.rb +19 -0
  1333. data/lib/square/types/payment_link_related_resources.rb +12 -0
  1334. data/lib/square/types/payment_options.rb +12 -0
  1335. data/lib/square/types/payment_options_delay_action.rb +11 -0
  1336. data/lib/square/types/payment_refund.rb +28 -0
  1337. data/lib/square/types/payment_updated_event.rb +16 -0
  1338. data/lib/square/types/payment_updated_event_data.rb +11 -0
  1339. data/lib/square/types/payment_updated_event_object.rb +9 -0
  1340. data/lib/square/types/payout.rb +22 -0
  1341. data/lib/square/types/payout_entry.rb +90 -0
  1342. data/lib/square/types/payout_failed_event.rb +15 -0
  1343. data/lib/square/types/payout_failed_event_data.rb +11 -0
  1344. data/lib/square/types/payout_failed_event_object.rb +9 -0
  1345. data/lib/square/types/payout_fee.rb +12 -0
  1346. data/lib/square/types/payout_fee_type.rb +11 -0
  1347. data/lib/square/types/payout_paid_event.rb +15 -0
  1348. data/lib/square/types/payout_paid_event_data.rb +11 -0
  1349. data/lib/square/types/payout_paid_event_object.rb +9 -0
  1350. data/lib/square/types/payout_sent_event.rb +15 -0
  1351. data/lib/square/types/payout_sent_event_data.rb +11 -0
  1352. data/lib/square/types/payout_sent_event_object.rb +9 -0
  1353. data/lib/square/types/payout_status.rb +12 -0
  1354. data/lib/square/types/payout_type.rb +11 -0
  1355. data/lib/square/types/phase.rb +13 -0
  1356. data/lib/square/types/phase_input.rb +11 -0
  1357. data/lib/square/types/pre_populated_data.rb +14 -0
  1358. data/lib/square/types/processing_fee.rb +12 -0
  1359. data/lib/square/types/product.rb +19 -0
  1360. data/lib/square/types/publish_invoice_response.rb +11 -0
  1361. data/lib/square/types/publish_scheduled_shift_response.rb +12 -0
  1362. data/lib/square/types/qr_code_options.rb +12 -0
  1363. data/lib/square/types/quick_pay.rb +14 -0
  1364. data/lib/square/types/range.rb +11 -0
  1365. data/lib/square/types/receipt_options.rb +12 -0
  1366. data/lib/square/types/redeem_loyalty_reward_response.rb +11 -0
  1367. data/lib/square/types/refund.rb +21 -0
  1368. data/lib/square/types/refund_created_event.rb +14 -0
  1369. data/lib/square/types/refund_created_event_data.rb +11 -0
  1370. data/lib/square/types/refund_created_event_object.rb +9 -0
  1371. data/lib/square/types/refund_payment_response.rb +15 -0
  1372. data/lib/square/types/refund_status.rb +13 -0
  1373. data/lib/square/types/refund_updated_event.rb +15 -0
  1374. data/lib/square/types/refund_updated_event_data.rb +11 -0
  1375. data/lib/square/types/refund_updated_event_object.rb +9 -0
  1376. data/lib/square/types/register_domain_response.rb +14 -0
  1377. data/lib/square/types/register_domain_response_status.rb +11 -0
  1378. data/lib/square/types/remove_group_from_customer_response.rb +12 -0
  1379. data/lib/square/types/resume_subscription_response.rb +13 -0
  1380. data/lib/square/types/retrieve_booking_custom_attribute_definition_response.rb +14 -0
  1381. data/lib/square/types/retrieve_booking_custom_attribute_response.rb +12 -0
  1382. data/lib/square/types/retrieve_job_response.rb +12 -0
  1383. data/lib/square/types/retrieve_location_booking_profile_response.rb +10 -0
  1384. data/lib/square/types/retrieve_location_custom_attribute_definition_response.rb +14 -0
  1385. data/lib/square/types/retrieve_location_custom_attribute_response.rb +12 -0
  1386. data/lib/square/types/retrieve_location_settings_response.rb +10 -0
  1387. data/lib/square/types/retrieve_merchant_custom_attribute_definition_response.rb +14 -0
  1388. data/lib/square/types/retrieve_merchant_custom_attribute_response.rb +12 -0
  1389. data/lib/square/types/retrieve_merchant_settings_response.rb +10 -0
  1390. data/lib/square/types/retrieve_order_custom_attribute_definition_response.rb +13 -0
  1391. data/lib/square/types/retrieve_order_custom_attribute_response.rb +11 -0
  1392. data/lib/square/types/retrieve_scheduled_shift_response.rb +12 -0
  1393. data/lib/square/types/retrieve_timecard_response.rb +13 -0
  1394. data/lib/square/types/retrieve_token_status_response.rb +15 -0
  1395. data/lib/square/types/revoke_token_response.rb +10 -0
  1396. data/lib/square/types/risk_evaluation.rb +16 -0
  1397. data/lib/square/types/risk_evaluation_risk_level.rb +13 -0
  1398. data/lib/square/types/save_card_options.rb +12 -0
  1399. data/lib/square/types/scheduled_shift.rb +17 -0
  1400. data/lib/square/types/scheduled_shift_details.rb +18 -0
  1401. data/lib/square/types/scheduled_shift_filter.rb +21 -0
  1402. data/lib/square/types/scheduled_shift_filter_assignment_status.rb +11 -0
  1403. data/lib/square/types/scheduled_shift_filter_scheduled_shift_status.rb +11 -0
  1404. data/lib/square/types/scheduled_shift_notification_audience.rb +12 -0
  1405. data/lib/square/types/scheduled_shift_query.rb +12 -0
  1406. data/lib/square/types/scheduled_shift_sort.rb +12 -0
  1407. data/lib/square/types/scheduled_shift_sort_field.rb +13 -0
  1408. data/lib/square/types/scheduled_shift_workday.rb +15 -0
  1409. data/lib/square/types/scheduled_shift_workday_matcher.rb +12 -0
  1410. data/lib/square/types/search_availability_filter.rb +15 -0
  1411. data/lib/square/types/search_availability_query.rb +10 -0
  1412. data/lib/square/types/search_availability_response.rb +10 -0
  1413. data/lib/square/types/search_catalog_items_request_stock_level.rb +11 -0
  1414. data/lib/square/types/search_catalog_items_response.rb +13 -0
  1415. data/lib/square/types/search_catalog_objects_response.rb +15 -0
  1416. data/lib/square/types/search_customers_response.rb +16 -0
  1417. data/lib/square/types/search_events_filter.rb +13 -0
  1418. data/lib/square/types/search_events_query.rb +11 -0
  1419. data/lib/square/types/search_events_response.rb +17 -0
  1420. data/lib/square/types/search_events_sort.rb +11 -0
  1421. data/lib/square/types/search_invoices_response.rb +12 -0
  1422. data/lib/square/types/search_loyalty_accounts_request_loyalty_account_query.rb +13 -0
  1423. data/lib/square/types/search_loyalty_accounts_response.rb +14 -0
  1424. data/lib/square/types/search_loyalty_events_response.rb +13 -0
  1425. data/lib/square/types/search_loyalty_rewards_request_loyalty_reward_query.rb +11 -0
  1426. data/lib/square/types/search_loyalty_rewards_response.rb +12 -0
  1427. data/lib/square/types/search_orders_customer_filter.rb +12 -0
  1428. data/lib/square/types/search_orders_date_time_filter.rb +25 -0
  1429. data/lib/square/types/search_orders_filter.rb +15 -0
  1430. data/lib/square/types/search_orders_fulfillment_filter.rb +15 -0
  1431. data/lib/square/types/search_orders_query.rb +11 -0
  1432. data/lib/square/types/search_orders_response.rb +14 -0
  1433. data/lib/square/types/search_orders_sort.rb +12 -0
  1434. data/lib/square/types/search_orders_sort_field.rb +12 -0
  1435. data/lib/square/types/search_orders_source_filter.rb +10 -0
  1436. data/lib/square/types/search_orders_state_filter.rb +10 -0
  1437. data/lib/square/types/search_scheduled_shifts_response.rb +15 -0
  1438. data/lib/square/types/search_shifts_response.rb +14 -0
  1439. data/lib/square/types/search_subscriptions_filter.rb +13 -0
  1440. data/lib/square/types/search_subscriptions_query.rb +10 -0
  1441. data/lib/square/types/search_subscriptions_response.rb +13 -0
  1442. data/lib/square/types/search_team_members_filter.rb +18 -0
  1443. data/lib/square/types/search_team_members_query.rb +10 -0
  1444. data/lib/square/types/search_team_members_response.rb +12 -0
  1445. data/lib/square/types/search_terminal_actions_response.rb +11 -0
  1446. data/lib/square/types/search_terminal_checkouts_response.rb +11 -0
  1447. data/lib/square/types/search_terminal_refunds_response.rb +11 -0
  1448. data/lib/square/types/search_timecards_response.rb +14 -0
  1449. data/lib/square/types/search_vendors_request_filter.rb +11 -0
  1450. data/lib/square/types/search_vendors_request_sort.rb +11 -0
  1451. data/lib/square/types/search_vendors_request_sort_field.rb +11 -0
  1452. data/lib/square/types/search_vendors_response.rb +12 -0
  1453. data/lib/square/types/segment_filter.rb +11 -0
  1454. data/lib/square/types/select_option.rb +10 -0
  1455. data/lib/square/types/select_options.rb +12 -0
  1456. data/lib/square/types/shift.rb +28 -0
  1457. data/lib/square/types/shift_filter.rb +19 -0
  1458. data/lib/square/types/shift_filter_status.rb +11 -0
  1459. data/lib/square/types/shift_query.rb +13 -0
  1460. data/lib/square/types/shift_sort.rb +13 -0
  1461. data/lib/square/types/shift_sort_field.rb +13 -0
  1462. data/lib/square/types/shift_status.rb +11 -0
  1463. data/lib/square/types/shift_wage.rb +15 -0
  1464. data/lib/square/types/shift_workday.rb +15 -0
  1465. data/lib/square/types/shift_workday_matcher.rb +12 -0
  1466. data/lib/square/types/shipping_fee.rb +10 -0
  1467. data/lib/square/types/signature_image.rb +10 -0
  1468. data/lib/square/types/signature_options.rb +11 -0
  1469. data/lib/square/types/site.rb +15 -0
  1470. data/lib/square/types/snippet.rb +14 -0
  1471. data/lib/square/types/sort_order.rb +11 -0
  1472. data/lib/square/types/source_application.rb +12 -0
  1473. data/lib/square/types/square_account_details.rb +11 -0
  1474. data/lib/square/types/standard_unit_description.rb +12 -0
  1475. data/lib/square/types/standard_unit_description_group.rb +13 -0
  1476. data/lib/square/types/submit_evidence_response.rb +11 -0
  1477. data/lib/square/types/subscription.rb +31 -0
  1478. data/lib/square/types/subscription_action.rb +15 -0
  1479. data/lib/square/types/subscription_action_type.rb +14 -0
  1480. data/lib/square/types/subscription_cadence.rb +22 -0
  1481. data/lib/square/types/subscription_created_event.rb +14 -0
  1482. data/lib/square/types/subscription_created_event_data.rb +11 -0
  1483. data/lib/square/types/subscription_created_event_object.rb +9 -0
  1484. data/lib/square/types/subscription_event.rb +18 -0
  1485. data/lib/square/types/subscription_event_info.rb +11 -0
  1486. data/lib/square/types/subscription_event_info_code.rb +15 -0
  1487. data/lib/square/types/subscription_event_subscription_event_type.rb +16 -0
  1488. data/lib/square/types/subscription_phase.rb +15 -0
  1489. data/lib/square/types/subscription_pricing.rb +12 -0
  1490. data/lib/square/types/subscription_pricing_type.rb +11 -0
  1491. data/lib/square/types/subscription_source.rb +10 -0
  1492. data/lib/square/types/subscription_status.rb +14 -0
  1493. data/lib/square/types/subscription_test_result.rb +15 -0
  1494. data/lib/square/types/subscription_updated_event.rb +16 -0
  1495. data/lib/square/types/subscription_updated_event_data.rb +11 -0
  1496. data/lib/square/types/subscription_updated_event_object.rb +9 -0
  1497. data/lib/square/types/swap_plan_response.rb +13 -0
  1498. data/lib/square/types/tax_calculation_phase.rb +11 -0
  1499. data/lib/square/types/tax_ids.rb +14 -0
  1500. data/lib/square/types/tax_inclusion_type.rb +11 -0
  1501. data/lib/square/types/team_member.rb +21 -0
  1502. data/lib/square/types/team_member_assigned_locations.rb +13 -0
  1503. data/lib/square/types/team_member_assigned_locations_assignment_type.rb +11 -0
  1504. data/lib/square/types/team_member_booking_profile.rb +14 -0
  1505. data/lib/square/types/team_member_created_event.rb +14 -0
  1506. data/lib/square/types/team_member_created_event_data.rb +11 -0
  1507. data/lib/square/types/team_member_created_event_object.rb +9 -0
  1508. data/lib/square/types/team_member_invitation_status.rb +12 -0
  1509. data/lib/square/types/team_member_status.rb +11 -0
  1510. data/lib/square/types/team_member_updated_event.rb +14 -0
  1511. data/lib/square/types/team_member_updated_event_data.rb +11 -0
  1512. data/lib/square/types/team_member_updated_event_object.rb +9 -0
  1513. data/lib/square/types/team_member_wage.rb +17 -0
  1514. data/lib/square/types/team_member_wage_setting_updated_event.rb +14 -0
  1515. data/lib/square/types/team_member_wage_setting_updated_event_data.rb +11 -0
  1516. data/lib/square/types/team_member_wage_setting_updated_event_object.rb +9 -0
  1517. data/lib/square/types/tender.rb +30 -0
  1518. data/lib/square/types/tender_bank_account_details.rb +13 -0
  1519. data/lib/square/types/tender_bank_account_details_status.rb +12 -0
  1520. data/lib/square/types/tender_buy_now_pay_later_details.rb +13 -0
  1521. data/lib/square/types/tender_buy_now_pay_later_details_brand.rb +11 -0
  1522. data/lib/square/types/tender_buy_now_pay_later_details_status.rb +13 -0
  1523. data/lib/square/types/tender_card_details.rb +12 -0
  1524. data/lib/square/types/tender_card_details_entry_method.rb +14 -0
  1525. data/lib/square/types/tender_card_details_status.rb +13 -0
  1526. data/lib/square/types/tender_cash_details.rb +11 -0
  1527. data/lib/square/types/tender_square_account_details.rb +10 -0
  1528. data/lib/square/types/tender_square_account_details_status.rb +13 -0
  1529. data/lib/square/types/tender_type.rb +19 -0
  1530. data/lib/square/types/terminal_action.rb +29 -0
  1531. data/lib/square/types/terminal_action_action_type.rb +17 -0
  1532. data/lib/square/types/terminal_action_created_event.rb +14 -0
  1533. data/lib/square/types/terminal_action_created_event_data.rb +11 -0
  1534. data/lib/square/types/terminal_action_created_event_object.rb +9 -0
  1535. data/lib/square/types/terminal_action_query.rb +10 -0
  1536. data/lib/square/types/terminal_action_query_filter.rb +12 -0
  1537. data/lib/square/types/terminal_action_query_sort.rb +9 -0
  1538. data/lib/square/types/terminal_action_updated_event.rb +14 -0
  1539. data/lib/square/types/terminal_action_updated_event_data.rb +11 -0
  1540. data/lib/square/types/terminal_action_updated_event_object.rb +9 -0
  1541. data/lib/square/types/terminal_checkout.rb +30 -0
  1542. data/lib/square/types/terminal_checkout_created_event.rb +14 -0
  1543. data/lib/square/types/terminal_checkout_created_event_data.rb +11 -0
  1544. data/lib/square/types/terminal_checkout_created_event_object.rb +9 -0
  1545. data/lib/square/types/terminal_checkout_query.rb +10 -0
  1546. data/lib/square/types/terminal_checkout_query_filter.rb +11 -0
  1547. data/lib/square/types/terminal_checkout_query_sort.rb +9 -0
  1548. data/lib/square/types/terminal_checkout_updated_event.rb +14 -0
  1549. data/lib/square/types/terminal_checkout_updated_event_data.rb +11 -0
  1550. data/lib/square/types/terminal_checkout_updated_event_object.rb +9 -0
  1551. data/lib/square/types/terminal_refund.rb +23 -0
  1552. data/lib/square/types/terminal_refund_created_event.rb +14 -0
  1553. data/lib/square/types/terminal_refund_created_event_data.rb +11 -0
  1554. data/lib/square/types/terminal_refund_created_event_object.rb +9 -0
  1555. data/lib/square/types/terminal_refund_query.rb +10 -0
  1556. data/lib/square/types/terminal_refund_query_filter.rb +11 -0
  1557. data/lib/square/types/terminal_refund_query_sort.rb +9 -0
  1558. data/lib/square/types/terminal_refund_updated_event.rb +14 -0
  1559. data/lib/square/types/terminal_refund_updated_event_data.rb +11 -0
  1560. data/lib/square/types/terminal_refund_updated_event_object.rb +9 -0
  1561. data/lib/square/types/test_webhook_subscription_response.rb +15 -0
  1562. data/lib/square/types/time_range.rb +15 -0
  1563. data/lib/square/types/timecard.rb +24 -0
  1564. data/lib/square/types/timecard_filter.rb +16 -0
  1565. data/lib/square/types/timecard_filter_status.rb +11 -0
  1566. data/lib/square/types/timecard_query.rb +11 -0
  1567. data/lib/square/types/timecard_sort.rb +11 -0
  1568. data/lib/square/types/timecard_sort_field.rb +13 -0
  1569. data/lib/square/types/timecard_status.rb +11 -0
  1570. data/lib/square/types/timecard_wage.rb +13 -0
  1571. data/lib/square/types/timecard_workday.rb +13 -0
  1572. data/lib/square/types/timecard_workday_matcher.rb +12 -0
  1573. data/lib/square/types/tip_settings.rb +13 -0
  1574. data/lib/square/types/transaction.rb +23 -0
  1575. data/lib/square/types/transaction_product.rb +17 -0
  1576. data/lib/square/types/transaction_type.rb +11 -0
  1577. data/lib/square/types/unlink_customer_from_gift_card_response.rb +12 -0
  1578. data/lib/square/types/update_booking_custom_attribute_definition_response.rb +14 -0
  1579. data/lib/square/types/update_booking_response.rb +10 -0
  1580. data/lib/square/types/update_break_type_response.rb +13 -0
  1581. data/lib/square/types/update_catalog_image_request.rb +9 -0
  1582. data/lib/square/types/update_catalog_image_response.rb +10 -0
  1583. data/lib/square/types/update_customer_custom_attribute_definition_response.rb +14 -0
  1584. data/lib/square/types/update_customer_group_response.rb +14 -0
  1585. data/lib/square/types/update_customer_response.rb +15 -0
  1586. data/lib/square/types/update_invoice_response.rb +11 -0
  1587. data/lib/square/types/update_item_modifier_lists_response.rb +10 -0
  1588. data/lib/square/types/update_item_taxes_response.rb +10 -0
  1589. data/lib/square/types/update_job_response.rb +12 -0
  1590. data/lib/square/types/update_location_custom_attribute_definition_response.rb +14 -0
  1591. data/lib/square/types/update_location_response.rb +11 -0
  1592. data/lib/square/types/update_location_settings_response.rb +10 -0
  1593. data/lib/square/types/update_merchant_custom_attribute_definition_response.rb +14 -0
  1594. data/lib/square/types/update_merchant_settings_response.rb +10 -0
  1595. data/lib/square/types/update_order_custom_attribute_definition_response.rb +13 -0
  1596. data/lib/square/types/update_order_response.rb +12 -0
  1597. data/lib/square/types/update_payment_link_response.rb +10 -0
  1598. data/lib/square/types/update_payment_response.rb +12 -0
  1599. data/lib/square/types/update_scheduled_shift_response.rb +12 -0
  1600. data/lib/square/types/update_shift_response.rb +13 -0
  1601. data/lib/square/types/update_subscription_response.rb +12 -0
  1602. data/lib/square/types/update_team_member_request.rb +10 -0
  1603. data/lib/square/types/update_team_member_response.rb +11 -0
  1604. data/lib/square/types/update_timecard_response.rb +13 -0
  1605. data/lib/square/types/update_vendor_request.rb +11 -0
  1606. data/lib/square/types/update_vendor_response.rb +11 -0
  1607. data/lib/square/types/update_wage_setting_response.rb +12 -0
  1608. data/lib/square/types/update_webhook_subscription_response.rb +15 -0
  1609. data/lib/square/types/update_webhook_subscription_signature_key_response.rb +15 -0
  1610. data/lib/square/types/update_workweek_config_response.rb +13 -0
  1611. data/lib/square/types/upsert_booking_custom_attribute_response.rb +12 -0
  1612. data/lib/square/types/upsert_catalog_object_response.rb +13 -0
  1613. data/lib/square/types/upsert_customer_custom_attribute_response.rb +12 -0
  1614. data/lib/square/types/upsert_location_custom_attribute_response.rb +12 -0
  1615. data/lib/square/types/upsert_merchant_custom_attribute_response.rb +12 -0
  1616. data/lib/square/types/upsert_order_custom_attribute_response.rb +11 -0
  1617. data/lib/square/types/upsert_snippet_response.rb +11 -0
  1618. data/lib/square/types/v_1_money.rb +10 -0
  1619. data/lib/square/types/v_1_order.rb +36 -0
  1620. data/lib/square/types/v_1_order_history_entry.rb +11 -0
  1621. data/lib/square/types/v_1_order_history_entry_action.rb +16 -0
  1622. data/lib/square/types/v_1_order_state.rb +15 -0
  1623. data/lib/square/types/v_1_tender.rb +46 -0
  1624. data/lib/square/types/v_1_tender_card_brand.rb +18 -0
  1625. data/lib/square/types/v_1_tender_entry_method.rb +16 -0
  1626. data/lib/square/types/v_1_tender_type.rb +17 -0
  1627. data/lib/square/types/v_1_update_order_request_action.rb +12 -0
  1628. data/lib/square/types/vendor.rb +19 -0
  1629. data/lib/square/types/vendor_contact.rb +15 -0
  1630. data/lib/square/types/vendor_created_event.rb +15 -0
  1631. data/lib/square/types/vendor_created_event_data.rb +12 -0
  1632. data/lib/square/types/vendor_created_event_object.rb +10 -0
  1633. data/lib/square/types/vendor_status.rb +11 -0
  1634. data/lib/square/types/vendor_updated_event.rb +15 -0
  1635. data/lib/square/types/vendor_updated_event_data.rb +12 -0
  1636. data/lib/square/types/vendor_updated_event_object.rb +10 -0
  1637. data/lib/square/types/visibility_filter.rb +12 -0
  1638. data/lib/square/types/void_transaction_response.rb +11 -0
  1639. data/lib/square/types/wage_setting.rb +18 -0
  1640. data/lib/square/types/webhook_subscription.rb +19 -0
  1641. data/lib/square/types/weekday.rb +16 -0
  1642. data/lib/square/types/workweek_config.rb +16 -0
  1643. data/lib/square/v_1_transactions/client.rb +65 -0
  1644. data/lib/square/v_1_transactions/types/v_1_list_orders_request.rb +14 -0
  1645. data/lib/square/v_1_transactions/types/v_1_retrieve_order_request.rb +12 -0
  1646. data/lib/square/v_1_transactions/types/v_1_update_order_request.rb +17 -0
  1647. data/lib/square/vendors/client.rb +139 -0
  1648. data/lib/square/vendors/types/batch_create_vendors_request.rb +11 -0
  1649. data/lib/square/vendors/types/batch_get_vendors_request.rb +11 -0
  1650. data/lib/square/vendors/types/batch_update_vendors_request.rb +13 -0
  1651. data/lib/square/vendors/types/create_vendor_request.rb +12 -0
  1652. data/lib/square/vendors/types/get_vendors_request.rb +11 -0
  1653. data/lib/square/vendors/types/search_vendors_request.rb +13 -0
  1654. data/lib/square/vendors/types/update_vendors_request.rb +12 -0
  1655. data/lib/square/webhooks/client.rb +22 -0
  1656. data/lib/square/webhooks/event_types/client.rb +36 -0
  1657. data/lib/square/webhooks/event_types/types/list_event_types_request.rb +13 -0
  1658. data/lib/square/webhooks/subscriptions/client.rb +148 -0
  1659. data/lib/square/webhooks/subscriptions/types/create_webhook_subscription_request.rb +14 -0
  1660. data/lib/square/webhooks/subscriptions/types/delete_subscriptions_request.rb +13 -0
  1661. data/lib/square/webhooks/subscriptions/types/get_subscriptions_request.rb +13 -0
  1662. data/lib/square/webhooks/subscriptions/types/list_subscriptions_request.rb +16 -0
  1663. data/lib/square/webhooks/subscriptions/types/test_webhook_subscription_request.rb +14 -0
  1664. data/lib/square/webhooks/subscriptions/types/update_webhook_subscription_request.rb +14 -0
  1665. data/lib/square/webhooks/subscriptions/types/update_webhook_subscription_signature_key_request.rb +14 -0
  1666. data/lib/square.rb +1673 -76
  1667. data/lib/{square → square_legacy}/api/apple_pay_api.rb +1 -1
  1668. data/lib/{square → square_legacy}/api/bank_accounts_api.rb +1 -1
  1669. data/lib/{square → square_legacy}/api/base_api.rb +1 -1
  1670. data/lib/{square → square_legacy}/api/booking_custom_attributes_api.rb +1 -1
  1671. data/lib/{square → square_legacy}/api/bookings_api.rb +1 -1
  1672. data/lib/{square → square_legacy}/api/cards_api.rb +1 -1
  1673. data/lib/{square → square_legacy}/api/cash_drawers_api.rb +1 -1
  1674. data/lib/{square → square_legacy}/api/catalog_api.rb +1 -1
  1675. data/lib/{square → square_legacy}/api/checkout_api.rb +1 -1
  1676. data/lib/{square → square_legacy}/api/customer_custom_attributes_api.rb +1 -1
  1677. data/lib/{square → square_legacy}/api/customer_groups_api.rb +1 -1
  1678. data/lib/{square → square_legacy}/api/customer_segments_api.rb +1 -1
  1679. data/lib/{square → square_legacy}/api/customers_api.rb +1 -1
  1680. data/lib/{square → square_legacy}/api/devices_api.rb +1 -1
  1681. data/lib/{square → square_legacy}/api/disputes_api.rb +1 -1
  1682. data/lib/{square → square_legacy}/api/employees_api.rb +1 -1
  1683. data/lib/{square → square_legacy}/api/events_api.rb +1 -1
  1684. data/lib/{square → square_legacy}/api/gift_card_activities_api.rb +1 -1
  1685. data/lib/{square → square_legacy}/api/gift_cards_api.rb +1 -1
  1686. data/lib/{square → square_legacy}/api/inventory_api.rb +1 -1
  1687. data/lib/{square → square_legacy}/api/invoices_api.rb +1 -1
  1688. data/lib/{square → square_legacy}/api/labor_api.rb +1 -1
  1689. data/lib/{square → square_legacy}/api/location_custom_attributes_api.rb +1 -1
  1690. data/lib/{square → square_legacy}/api/locations_api.rb +1 -1
  1691. data/lib/{square → square_legacy}/api/loyalty_api.rb +1 -1
  1692. data/lib/{square → square_legacy}/api/merchant_custom_attributes_api.rb +1 -1
  1693. data/lib/{square → square_legacy}/api/merchants_api.rb +1 -1
  1694. data/lib/{square → square_legacy}/api/mobile_authorization_api.rb +1 -1
  1695. data/lib/{square → square_legacy}/api/o_auth_api.rb +1 -1
  1696. data/lib/{square → square_legacy}/api/order_custom_attributes_api.rb +1 -1
  1697. data/lib/{square → square_legacy}/api/orders_api.rb +1 -1
  1698. data/lib/{square → square_legacy}/api/payments_api.rb +1 -1
  1699. data/lib/{square → square_legacy}/api/payouts_api.rb +1 -1
  1700. data/lib/{square → square_legacy}/api/refunds_api.rb +1 -1
  1701. data/lib/{square → square_legacy}/api/sites_api.rb +1 -1
  1702. data/lib/{square → square_legacy}/api/snippets_api.rb +1 -1
  1703. data/lib/{square → square_legacy}/api/subscriptions_api.rb +1 -1
  1704. data/lib/{square → square_legacy}/api/team_api.rb +1 -1
  1705. data/lib/{square → square_legacy}/api/terminal_api.rb +1 -1
  1706. data/lib/{square → square_legacy}/api/transactions_api.rb +1 -1
  1707. data/lib/{square → square_legacy}/api/v1_transactions_api.rb +1 -1
  1708. data/lib/{square → square_legacy}/api/vendors_api.rb +1 -1
  1709. data/lib/{square → square_legacy}/api/webhook_subscriptions_api.rb +1 -1
  1710. data/lib/{square → square_legacy}/api_helper.rb +1 -1
  1711. data/lib/square_legacy/client.rb +326 -0
  1712. data/lib/{square → square_legacy}/configuration.rb +1 -1
  1713. data/lib/{square → square_legacy}/exceptions/api_exception.rb +1 -1
  1714. data/lib/{square → square_legacy}/http/api_response.rb +1 -1
  1715. data/lib/{square → square_legacy}/http/auth/o_auth2.rb +1 -1
  1716. data/lib/{square → square_legacy}/http/http_call_back.rb +1 -1
  1717. data/lib/{square → square_legacy}/http/http_method_enum.rb +1 -1
  1718. data/lib/{square → square_legacy}/http/http_request.rb +1 -1
  1719. data/lib/{square → square_legacy}/http/http_response.rb +1 -1
  1720. data/lib/{square → square_legacy}/utilities/date_time_helper.rb +1 -1
  1721. data/lib/{square → square_legacy}/utilities/file_wrapper.rb +1 -1
  1722. data/lib/{square → square_legacy}/utilities/webhooks_helper.rb +1 -1
  1723. data/lib/square_legacy.rb +76 -0
  1724. data/test/square/integration/client_tests/test_cash_drawers.rb +27 -0
  1725. data/test/square/integration/client_tests/test_catalog.rb +701 -0
  1726. data/test/square/integration/client_tests/test_customers.rb +65 -0
  1727. data/test/square/integration/client_tests/test_customers_groups.rb +144 -0
  1728. data/test/square/integration/client_tests/test_customers_segments.rb +36 -0
  1729. data/test/square/integration/client_tests/test_devices.rb +67 -0
  1730. data/test/square/integration/client_tests/test_inventory.rb +28 -0
  1731. data/test/square/integration/client_tests/test_locations.rb +18 -0
  1732. data/test/square/integration/client_tests/test_merchants.rb +40 -0
  1733. data/test/square/integration/client_tests/test_mobile.rb +21 -0
  1734. data/test/square/integration/client_tests/test_orders.rb +177 -0
  1735. data/test/square/integration/client_tests/test_payments.rb +167 -0
  1736. data/test/square/integration/client_tests/test_refunds.rb +133 -0
  1737. data/test/square/integration/client_tests/test_team_members.rb +97 -0
  1738. data/test/square/integration/client_tests/test_terminal.rb +107 -0
  1739. data/test/square/integration/integration_test_base.rb +16 -0
  1740. data/test/square/integration/testdata/image.jpeg +0 -0
  1741. data/test/square/internal/multipart/test_form_data.rb +311 -0
  1742. data/test/square/internal/types/test_array.rb +37 -0
  1743. data/test/square/internal/types/test_boolean.rb +35 -0
  1744. data/test/square/internal/types/test_enum.rb +42 -0
  1745. data/test/square/internal/types/test_hash.rb +50 -0
  1746. data/test/square/internal/types/test_model.rb +105 -0
  1747. data/test/square/internal/types/test_union.rb +52 -0
  1748. data/test/square/internal/types/test_utils.rb +216 -0
  1749. data/test/{api → square_legacy/api}/api_test_base.rb +2 -2
  1750. data/test/{http_response_catcher.rb → square_legacy/http_response_catcher.rb} +1 -1
  1751. data/test/{webhooks → square_legacy/webhooks}/test_webhooks_helper.rb +12 -12
  1752. data/test/test_helper.rb +123 -0
  1753. metadata +1765 -77
  1754. data/spec/user_journey_spec.rb +0 -145
  1755. /data/test/{api → square_legacy/api}/test_catalog_api.rb +0 -0
  1756. /data/test/{api → square_legacy/api}/test_customers_api.rb +0 -0
  1757. /data/test/{api → square_legacy/api}/test_employees_api.rb +0 -0
  1758. /data/test/{api → square_legacy/api}/test_labor_api.rb +0 -0
  1759. /data/test/{api → square_legacy/api}/test_locations_api.rb +0 -0
  1760. /data/test/{api → square_legacy/api}/test_merchants_api.rb +0 -0
  1761. /data/test/{api → square_legacy/api}/test_payments_api.rb +0 -0
  1762. /data/test/{api → square_legacy/api}/test_refunds_api.rb +0 -0
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Internal
5
+ module Types
6
+ # @abstract
7
+ module Type
8
+ include Square::Internal::JSON::Serializable
9
+
10
+ # Coerces a value to this type
11
+ #
12
+ # @param value [unknown]
13
+ # @option strict [Boolean] If we should strictly coerce this value
14
+ def coerce(value, strict: strict?)
15
+ raise NotImplementedError
16
+ end
17
+
18
+ # Returns if strictness is on for this type, defaults to `false`
19
+ #
20
+ # @return [Boolean]
21
+ def strict?
22
+ @strict ||= false
23
+ end
24
+
25
+ # Enable strictness by default for this type
26
+ #
27
+ # @return [void]
28
+ def strict!
29
+ @strict = true
30
+ self
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Internal
5
+ module Types
6
+ # Define a union between two types
7
+ module Union
8
+ include Square::Internal::Types::Type
9
+
10
+ def members
11
+ @members ||= []
12
+ end
13
+
14
+ # Add a member to this union
15
+ #
16
+ # @param type [Object]
17
+ # @option key [Symbol, String]
18
+ # @return [void]
19
+ def member(type, key: nil)
20
+ members.push([key, Utils.wrap_type(type)])
21
+ self
22
+ end
23
+
24
+ def member?(type)
25
+ members.any? { |_key, type_fn| type == type_fn.call }
26
+ end
27
+
28
+ # Set the discriminant for this union
29
+ #
30
+ # @param key [Symbol, String]
31
+ # @return [void]
32
+ def discriminant(key)
33
+ @discriminant = key
34
+ end
35
+
36
+ # @api private
37
+ private def discriminated?
38
+ !@discriminant.nil?
39
+ end
40
+
41
+ # Resolves the type of a value to be one of the members
42
+ #
43
+ # @param value [Object]
44
+ # @return [Class]
45
+ private def resolve_member(value)
46
+ if discriminated? && value.is_a?(::Hash)
47
+ disciminant_value = value.fetch(@discriminant, nil)
48
+
49
+ return if disciminant_value.nil?
50
+
51
+ members.to_h[disciminant_value]&.call
52
+ else
53
+ members.find do |_key, mem|
54
+ member_type = Utils.unwrap_type(mem)
55
+
56
+ value.is_a?(member_type)
57
+ end&.last&.call
58
+ end
59
+ end
60
+
61
+ def coerce(value, strict: strict?)
62
+ type = resolve_member(value)
63
+
64
+ unless type
65
+ return value unless strict
66
+
67
+ if discriminated?
68
+ raise Errors::TypeError,
69
+ "value of type `#{value.class}` not member of union #{self}"
70
+ end
71
+
72
+ raise Errors::TypeError, "could not resolve to member of union #{self}"
73
+ end
74
+
75
+ Utils.coerce(type, value, strict: strict)
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Internal
5
+ module Types
6
+ module Unknown
7
+ include Square::Internal::Types::Type
8
+
9
+ def coerce(value)
10
+ value
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Internal
5
+ module Types
6
+ # Utilities for dealing with and checking types
7
+ module Utils
8
+ # Wraps a type into a type function
9
+ #
10
+ # @param type [Proc, Object]
11
+ # @return [Proc]
12
+ def self.wrap_type(type)
13
+ case type
14
+ when Proc
15
+ type
16
+ else
17
+ -> { type }
18
+ end
19
+ end
20
+
21
+ # Resolves a type or type function into a type
22
+ #
23
+ # @param type [Proc, Object]
24
+ # @return [Object]
25
+ def self.unwrap_type(type)
26
+ type.is_a?(Proc) ? type.call : type
27
+ end
28
+
29
+ def self.coerce(target, value, strict: false) # rubocop:disable Metrics/CyclomaticComplexity
30
+ type = unwrap_type(target)
31
+
32
+ case type
33
+ in Array
34
+ case value
35
+ when ::Array
36
+ return type.coerce(value, strict: strict)
37
+ when Set, ::Hash
38
+ return coerce(type, value.to_a)
39
+ end
40
+ in Hash
41
+ case value
42
+ when ::Hash
43
+ return type.coerce(value, strict: strict)
44
+ when ::Array
45
+ return coerce(type, value.to_h)
46
+ end
47
+ in ->(t) { t <= NilClass }
48
+ return nil
49
+ in ->(t) { t <= String }
50
+ case value
51
+ when String, Symbol, Numeric, TrueClass, FalseClass
52
+ return value.to_s
53
+ end
54
+ in ->(t) { t <= Symbol }
55
+ case value
56
+ when Symbol, String
57
+ return value.to_sym
58
+ end
59
+ in ->(t) { t <= Integer }
60
+ case value
61
+ when Numeric, String, Time
62
+ return value.to_i
63
+ end
64
+ in ->(t) { t <= Float }
65
+ case value
66
+ when Numeric, Time, String
67
+ return value.to_f
68
+ end
69
+ in ->(t) { t <= Model }
70
+ case value
71
+ when type
72
+ return value
73
+ when ::Hash
74
+ return type.coerce(value, strict: strict)
75
+ end
76
+ in Module
77
+ case type
78
+ in ->(t) { t.singleton_class.included_modules.include?(Enum) }
79
+ return type.coerce(value, strict: strict)
80
+ in ->(t) { t.singleton_class.included_modules.include?(Union) }
81
+ return type.coerce(value, strict: strict)
82
+ else
83
+ value
84
+ end
85
+ else
86
+ value
87
+ end
88
+
89
+ raise Errors::TypeError, "cannot coerce value of type `#{value.class}` to `#{target}`" if strict
90
+
91
+ value
92
+ end
93
+
94
+ def self.symbolize_keys(hash)
95
+ hash.transform_keys(&:to_sym)
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,293 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Inventory
5
+ class Client
6
+ # @return [Square::Inventory::Client]
7
+ def initialize(client:)
8
+ @client = client
9
+ end
10
+
11
+ # Deprecated version of [RetrieveInventoryAdjustment](api-endpoint:Inventory-RetrieveInventoryAdjustment) after the endpoint URL
12
+ # is updated to conform to the standard convention.
13
+ #
14
+ # @return [Square::Types::GetInventoryAdjustmentResponse]
15
+ def deprecated_get_adjustment(request_options: {}, **params)
16
+ _request = Square::Internal::JSON::Request.new(
17
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
18
+ method: "GET",
19
+ path: "v2/inventory/adjustment/#{params[:adjustment_id]}"
20
+ )
21
+ _response = @client.send(_request)
22
+ if _response.code >= "200" && _response.code < "300"
23
+ return Square::Types::GetInventoryAdjustmentResponse.load(_response.body)
24
+ end
25
+
26
+ raise _response.body
27
+ end
28
+
29
+ # Returns the [InventoryAdjustment](entity:InventoryAdjustment) object
30
+ # with the provided `adjustment_id`.
31
+ #
32
+ # @return [Square::Types::GetInventoryAdjustmentResponse]
33
+ def get_adjustment(request_options: {}, **params)
34
+ _request = Square::Internal::JSON::Request.new(
35
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
36
+ method: "GET",
37
+ path: "v2/inventory/adjustments/#{params[:adjustment_id]}"
38
+ )
39
+ _response = @client.send(_request)
40
+ if _response.code >= "200" && _response.code < "300"
41
+ return Square::Types::GetInventoryAdjustmentResponse.load(_response.body)
42
+ end
43
+
44
+ raise _response.body
45
+ end
46
+
47
+ # Deprecated version of [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) after the endpoint URL
48
+ # is updated to conform to the standard convention.
49
+ #
50
+ # @return [Square::Types::BatchChangeInventoryResponse]
51
+ def deprecated_batch_change(request_options: {}, **params)
52
+ _request = Square::Internal::JSON::Request.new(
53
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
54
+ method: "POST",
55
+ path: "v2/inventory/batch-change",
56
+ body: Square::Types::BatchChangeInventoryRequest.new(params).to_h
57
+ )
58
+ _response = @client.send(_request)
59
+ if _response.code >= "200" && _response.code < "300"
60
+ return Square::Types::BatchChangeInventoryResponse.load(_response.body)
61
+ end
62
+
63
+ raise _response.body
64
+ end
65
+
66
+ # Deprecated version of [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges) after the endpoint URL
67
+ # is updated to conform to the standard convention.
68
+ #
69
+ # @return [Square::Types::BatchGetInventoryChangesResponse]
70
+ def deprecated_batch_get_changes(request_options: {}, **params)
71
+ _request = Square::Internal::JSON::Request.new(
72
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
73
+ method: "POST",
74
+ path: "v2/inventory/batch-retrieve-changes",
75
+ body: Square::Types::BatchRetrieveInventoryChangesRequest.new(params).to_h
76
+ )
77
+ _response = @client.send(_request)
78
+ if _response.code >= "200" && _response.code < "300"
79
+ return Square::Types::BatchGetInventoryChangesResponse.load(_response.body)
80
+ end
81
+
82
+ raise _response.body
83
+ end
84
+
85
+ # Deprecated version of [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts) after the endpoint URL
86
+ # is updated to conform to the standard convention.
87
+ #
88
+ # @return [Square::Types::BatchGetInventoryCountsResponse]
89
+ def deprecated_batch_get_counts(request_options: {}, **params)
90
+ _request = Square::Internal::JSON::Request.new(
91
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
92
+ method: "POST",
93
+ path: "v2/inventory/batch-retrieve-counts",
94
+ body: Square::Types::BatchGetInventoryCountsRequest.new(params).to_h
95
+ )
96
+ _response = @client.send(_request)
97
+ if _response.code >= "200" && _response.code < "300"
98
+ return Square::Types::BatchGetInventoryCountsResponse.load(_response.body)
99
+ end
100
+
101
+ raise _response.body
102
+ end
103
+
104
+ # Applies adjustments and counts to the provided item quantities.
105
+ #
106
+ # On success: returns the current calculated counts for all objects
107
+ # referenced in the request.
108
+ # On failure: returns a list of related errors.
109
+ #
110
+ # @return [Square::Types::BatchChangeInventoryResponse]
111
+ def batch_create_changes(request_options: {}, **params)
112
+ _request = Square::Internal::JSON::Request.new(
113
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
114
+ method: "POST",
115
+ path: "v2/inventory/changes/batch-create",
116
+ body: Square::Types::BatchChangeInventoryRequest.new(params).to_h
117
+ )
118
+ _response = @client.send(_request)
119
+ if _response.code >= "200" && _response.code < "300"
120
+ return Square::Types::BatchChangeInventoryResponse.load(_response.body)
121
+ end
122
+
123
+ raise _response.body
124
+ end
125
+
126
+ # Returns historical physical counts and adjustments based on the
127
+ # provided filter criteria.
128
+ #
129
+ # Results are paginated and sorted in ascending order according their
130
+ # `occurred_at` timestamp (oldest first).
131
+ #
132
+ # BatchRetrieveInventoryChanges is a catch-all query endpoint for queries
133
+ # that cannot be handled by other, simpler endpoints.
134
+ #
135
+ # @return [Square::Types::BatchGetInventoryChangesResponse]
136
+ def batch_get_changes(request_options: {}, **params)
137
+ _request = Square::Internal::JSON::Request.new(
138
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
139
+ method: "POST",
140
+ path: "v2/inventory/changes/batch-retrieve",
141
+ body: Square::Types::BatchRetrieveInventoryChangesRequest.new(params).to_h
142
+ )
143
+ _response = @client.send(_request)
144
+ if _response.code >= "200" && _response.code < "300"
145
+ return Square::Types::BatchGetInventoryChangesResponse.load(_response.body)
146
+ end
147
+
148
+ raise _response.body
149
+ end
150
+
151
+ # Returns current counts for the provided
152
+ # [CatalogObject](entity:CatalogObject)s at the requested
153
+ # [Location](entity:Location)s.
154
+ #
155
+ # Results are paginated and sorted in descending order according to their
156
+ # `calculated_at` timestamp (newest first).
157
+ #
158
+ # When `updated_after` is specified, only counts that have changed since that
159
+ # time (based on the server timestamp for the most recent change) are
160
+ # returned. This allows clients to perform a "sync" operation, for example
161
+ # in response to receiving a Webhook notification.
162
+ #
163
+ # @return [Square::Types::BatchGetInventoryCountsResponse]
164
+ def batch_get_counts(request_options: {}, **params)
165
+ _request = Square::Internal::JSON::Request.new(
166
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
167
+ method: "POST",
168
+ path: "v2/inventory/counts/batch-retrieve",
169
+ body: Square::Types::BatchGetInventoryCountsRequest.new(params).to_h
170
+ )
171
+ _response = @client.send(_request)
172
+ if _response.code >= "200" && _response.code < "300"
173
+ return Square::Types::BatchGetInventoryCountsResponse.load(_response.body)
174
+ end
175
+
176
+ raise _response.body
177
+ end
178
+
179
+ # Deprecated version of [RetrieveInventoryPhysicalCount](api-endpoint:Inventory-RetrieveInventoryPhysicalCount) after the endpoint URL
180
+ # is updated to conform to the standard convention.
181
+ #
182
+ # @return [Square::Types::GetInventoryPhysicalCountResponse]
183
+ def deprecated_get_physical_count(request_options: {}, **params)
184
+ _request = Square::Internal::JSON::Request.new(
185
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
186
+ method: "GET",
187
+ path: "v2/inventory/physical-count/#{params[:physical_count_id]}"
188
+ )
189
+ _response = @client.send(_request)
190
+ if _response.code >= "200" && _response.code < "300"
191
+ return Square::Types::GetInventoryPhysicalCountResponse.load(_response.body)
192
+ end
193
+
194
+ raise _response.body
195
+ end
196
+
197
+ # Returns the [InventoryPhysicalCount](entity:InventoryPhysicalCount)
198
+ # object with the provided `physical_count_id`.
199
+ #
200
+ # @return [Square::Types::GetInventoryPhysicalCountResponse]
201
+ def get_physical_count(request_options: {}, **params)
202
+ _request = Square::Internal::JSON::Request.new(
203
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
204
+ method: "GET",
205
+ path: "v2/inventory/physical-counts/#{params[:physical_count_id]}"
206
+ )
207
+ _response = @client.send(_request)
208
+ if _response.code >= "200" && _response.code < "300"
209
+ return Square::Types::GetInventoryPhysicalCountResponse.load(_response.body)
210
+ end
211
+
212
+ raise _response.body
213
+ end
214
+
215
+ # Returns the [InventoryTransfer](entity:InventoryTransfer) object
216
+ # with the provided `transfer_id`.
217
+ #
218
+ # @return [Square::Types::GetInventoryTransferResponse]
219
+ def get_transfer(request_options: {}, **params)
220
+ _request = Square::Internal::JSON::Request.new(
221
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
222
+ method: "GET",
223
+ path: "v2/inventory/transfers/#{params[:transfer_id]}"
224
+ )
225
+ _response = @client.send(_request)
226
+ if _response.code >= "200" && _response.code < "300"
227
+ return Square::Types::GetInventoryTransferResponse.load(_response.body)
228
+ end
229
+
230
+ raise _response.body
231
+ end
232
+
233
+ # Retrieves the current calculated stock count for a given
234
+ # [CatalogObject](entity:CatalogObject) at a given set of
235
+ # [Location](entity:Location)s. Responses are paginated and unsorted.
236
+ # For more sophisticated queries, use a batch endpoint.
237
+ #
238
+ # @return [Square::Types::GetInventoryCountResponse]
239
+ def get(request_options: {}, **params)
240
+ _query_param_names = %w[location_ids cursor]
241
+ _query = params.slice(*_query_param_names)
242
+ params = params.except(*_query_param_names)
243
+
244
+ _request = Square::Internal::JSON::Request.new(
245
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
246
+ method: "GET",
247
+ path: "v2/inventory/#{params[:catalog_object_id]}",
248
+ query: _query
249
+ )
250
+ _response = @client.send(_request)
251
+ if _response.code >= "200" && _response.code < "300"
252
+ return Square::Types::GetInventoryCountResponse.load(_response.body)
253
+ end
254
+
255
+ raise _response.body
256
+ end
257
+
258
+ # Returns a set of physical counts and inventory adjustments for the
259
+ # provided [CatalogObject](entity:CatalogObject) at the requested
260
+ # [Location](entity:Location)s.
261
+ #
262
+ # You can achieve the same result by calling [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges)
263
+ # and having the `catalog_object_ids` list contain a single element of the `CatalogObject` ID.
264
+ #
265
+ # Results are paginated and sorted in descending order according to their
266
+ # `occurred_at` timestamp (newest first).
267
+ #
268
+ # There are no limits on how far back the caller can page. This endpoint can be
269
+ # used to display recent changes for a specific item. For more
270
+ # sophisticated queries, use a batch endpoint.
271
+ #
272
+ # @return [Square::Types::GetInventoryChangesResponse]
273
+ def changes(request_options: {}, **params)
274
+ _query_param_names = %w[location_ids cursor]
275
+ _query = params.slice(*_query_param_names)
276
+ params = params.except(*_query_param_names)
277
+
278
+ _request = Square::Internal::JSON::Request.new(
279
+ base_url: request_options[:base_url] || Square::Environment::SANDBOX,
280
+ method: "GET",
281
+ path: "v2/inventory/#{params[:catalog_object_id]}/changes",
282
+ query: _query
283
+ )
284
+ _response = @client.send(_request)
285
+ if _response.code >= "200" && _response.code < "300"
286
+ return Square::Types::GetInventoryChangesResponse.load(_response.body)
287
+ end
288
+
289
+ raise _response.body
290
+ end
291
+ end
292
+ end
293
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Inventory
5
+ module Types
6
+ class ChangesInventoryRequest < Internal::Types::Model
7
+ field :catalog_object_id, -> { String }, optional: false, nullable: false
8
+ field :location_ids, -> { String }, optional: true, nullable: false
9
+ field :cursor, -> { String }, optional: true, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Inventory
5
+ module Types
6
+ class DeprecatedGetAdjustmentInventoryRequest < Internal::Types::Model
7
+ field :adjustment_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Inventory
5
+ module Types
6
+ class DeprecatedGetPhysicalCountInventoryRequest < Internal::Types::Model
7
+ field :physical_count_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Inventory
5
+ module Types
6
+ class GetAdjustmentInventoryRequest < Internal::Types::Model
7
+ field :adjustment_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Inventory
5
+ module Types
6
+ class GetInventoryRequest < Internal::Types::Model
7
+ field :catalog_object_id, -> { String }, optional: false, nullable: false
8
+ field :location_ids, -> { String }, optional: true, nullable: false
9
+ field :cursor, -> { String }, optional: true, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Inventory
5
+ module Types
6
+ class GetPhysicalCountInventoryRequest < Internal::Types::Model
7
+ field :physical_count_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Square
4
+ module Inventory
5
+ module Types
6
+ class GetTransferInventoryRequest < Internal::Types::Model
7
+ field :transfer_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end