square.rb 44.1.0.20250924 → 45.0.1.20260122
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.
- checksums.yaml +4 -4
- data/.fern/metadata.json +9 -0
- data/.fernignore +20 -0
- data/.rubocop.yml +60 -0
- data/LICENSE +1 -1
- data/Rakefile +29 -0
- data/custom.gemspec.rb +19 -0
- data/lib/square/apple_pay/client.rb +24 -10
- data/lib/square/bank_accounts/client.rb +144 -31
- data/lib/square/bank_accounts/types/create_bank_account_request.rb +13 -0
- data/lib/square/bank_accounts/types/disable_bank_account_request.rb +11 -0
- data/lib/square/bank_accounts/types/get_by_v_1_id_bank_accounts_request.rb +1 -1
- data/lib/square/bank_accounts/types/list_bank_accounts_request.rb +1 -0
- data/lib/square/bookings/client.rb +238 -100
- data/lib/square/bookings/custom_attribute_definitions/client.rb +139 -67
- data/lib/square/bookings/custom_attribute_definitions/types/create_booking_custom_attribute_definition_request.rb +1 -3
- data/lib/square/bookings/custom_attribute_definitions/types/update_booking_custom_attribute_definition_request.rb +1 -3
- data/lib/square/bookings/custom_attributes/client.rb +168 -76
- data/lib/square/bookings/custom_attributes/types/bulk_delete_booking_custom_attributes_request.rb +1 -3
- data/lib/square/bookings/custom_attributes/types/bulk_upsert_booking_custom_attributes_request.rb +1 -3
- data/lib/square/bookings/location_profiles/client.rb +44 -24
- data/lib/square/bookings/team_member_profiles/client.rb +66 -31
- data/lib/square/cards/client.rb +103 -45
- data/lib/square/cash_drawers/client.rb +3 -1
- data/lib/square/cash_drawers/shifts/client.rb +121 -61
- data/lib/square/catalog/client.rb +203 -91
- data/lib/square/catalog/images/client.rb +50 -20
- data/lib/square/catalog/object/client.rb +66 -29
- data/lib/square/catalog/object/types/delete_object_request.rb +1 -1
- data/lib/square/catalog/object/types/get_object_request.rb +1 -1
- data/lib/square/catalog/types/batch_upsert_catalog_objects_request.rb +1 -3
- data/lib/square/catalog/types/search_catalog_items_request.rb +3 -9
- data/lib/square/catalog/types/search_catalog_objects_request.rb +1 -3
- data/lib/square/channels/client.rb +131 -0
- data/lib/square/channels/types/bulk_retrieve_channels_request.rb +11 -0
- data/lib/square/channels/types/get_channels_request.rb +11 -0
- data/lib/square/channels/types/list_channels_request.rb +15 -0
- data/lib/square/checkout/client.rb +77 -31
- data/lib/square/checkout/payment_links/client.rb +120 -54
- data/lib/square/client.rb +18 -10
- data/lib/square/customers/cards/client.rb +43 -16
- data/lib/square/customers/client.rb +220 -97
- data/lib/square/customers/custom_attribute_definitions/client.rb +157 -74
- data/lib/square/customers/custom_attribute_definitions/types/batch_upsert_customer_custom_attributes_request.rb +1 -3
- data/lib/square/customers/custom_attribute_definitions/types/create_customer_custom_attribute_definition_request.rb +1 -3
- data/lib/square/customers/custom_attribute_definitions/types/update_customer_custom_attribute_definition_request.rb +1 -3
- data/lib/square/customers/custom_attributes/client.rb +117 -53
- data/lib/square/customers/groups/client.rb +156 -67
- data/lib/square/customers/segments/client.rb +62 -31
- data/lib/square/customers/types/bulk_create_customers_request.rb +1 -3
- data/lib/square/customers/types/bulk_update_customers_request.rb +1 -3
- data/lib/square/devices/client.rb +66 -31
- data/lib/square/devices/codes/client.rb +83 -38
- data/lib/square/disputes/client.rb +140 -60
- data/lib/square/disputes/evidence/client.rb +83 -39
- data/lib/square/employees/client.rb +66 -31
- data/lib/square/events/client.rb +80 -38
- data/lib/square/file_param.rb +77 -77
- data/lib/square/gift_cards/activities/client.rb +73 -31
- data/lib/square/gift_cards/client.rb +163 -69
- data/lib/square/internal/http/base_request.rb +6 -0
- data/lib/square/internal/http/raw_client.rb +111 -20
- data/lib/square/internal/iterators/cursor_item_iterator.rb +28 -0
- data/lib/square/internal/iterators/cursor_page_iterator.rb +51 -0
- data/lib/square/internal/iterators/item_iterator.rb +65 -0
- data/lib/square/internal/iterators/offset_item_iterator.rb +30 -0
- data/lib/square/internal/iterators/offset_page_iterator.rb +83 -0
- data/lib/square/internal/json/request.rb +2 -1
- data/lib/square/internal/multipart/multipart_request.rb +2 -1
- data/lib/square/internal/types/enum.rb +8 -0
- data/lib/square/internal/types/model/field.rb +11 -1
- data/lib/square/internal/types/model.rb +14 -4
- data/lib/square/internal/types/union.rb +88 -7
- data/lib/square/internal/types/utils.rb +20 -4
- data/lib/square/inventory/client.rb +100 -76
- data/lib/square/invoices/client.rb +228 -99
- data/lib/square/labor/break_types/client.rb +120 -53
- data/lib/square/labor/client.rb +205 -81
- data/lib/square/labor/employee_wages/client.rb +64 -31
- data/lib/square/labor/shifts/client.rb +94 -37
- data/lib/square/labor/team_member_wages/client.rb +64 -31
- data/lib/square/labor/types/bulk_publish_scheduled_shifts_request.rb +2 -6
- data/lib/square/labor/types/publish_scheduled_shift_request.rb +1 -3
- data/lib/square/labor/workweek_configs/client.rb +65 -32
- data/lib/square/locations/client.rb +102 -41
- data/lib/square/locations/custom_attribute_definitions/client.rb +135 -64
- data/lib/square/locations/custom_attribute_definitions/types/create_location_custom_attribute_definition_request.rb +1 -3
- data/lib/square/locations/custom_attribute_definitions/types/update_location_custom_attribute_definition_request.rb +1 -3
- data/lib/square/locations/custom_attributes/client.rb +156 -68
- data/lib/square/locations/custom_attributes/types/bulk_delete_location_custom_attributes_request.rb +1 -3
- data/lib/square/locations/custom_attributes/types/bulk_upsert_location_custom_attributes_request.rb +1 -3
- data/lib/square/locations/transactions/client.rb +93 -37
- data/lib/square/locations/types/create_checkout_request.rb +1 -3
- data/lib/square/loyalty/accounts/client.rb +109 -44
- data/lib/square/loyalty/accounts/types/search_loyalty_accounts_request.rb +1 -3
- data/lib/square/loyalty/client.rb +20 -8
- data/lib/square/loyalty/programs/client.rb +72 -29
- data/lib/square/loyalty/programs/promotions/client.rb +106 -46
- data/lib/square/loyalty/programs/promotions/types/cancel_promotions_request.rb +1 -1
- data/lib/square/loyalty/programs/promotions/types/get_promotions_request.rb +1 -1
- data/lib/square/loyalty/rewards/client.rb +96 -38
- data/lib/square/loyalty/rewards/types/search_loyalty_rewards_request.rb +1 -3
- data/lib/square/merchants/client.rb +60 -31
- data/lib/square/merchants/custom_attribute_definitions/client.rb +137 -65
- data/lib/square/merchants/custom_attribute_definitions/types/create_merchant_custom_attribute_definition_request.rb +1 -3
- data/lib/square/merchants/custom_attribute_definitions/types/update_merchant_custom_attribute_definition_request.rb +1 -3
- data/lib/square/merchants/custom_attributes/client.rb +156 -68
- data/lib/square/merchants/custom_attributes/types/bulk_delete_merchant_custom_attributes_request.rb +1 -3
- data/lib/square/merchants/custom_attributes/types/bulk_upsert_merchant_custom_attributes_request.rb +1 -3
- data/lib/square/o_auth/client.rb +76 -31
- data/lib/square/o_auth/types/obtain_token_request.rb +1 -0
- data/lib/square/orders/client.rb +156 -63
- data/lib/square/orders/custom_attribute_definitions/client.rb +137 -65
- data/lib/square/orders/custom_attribute_definitions/types/create_order_custom_attribute_definition_request.rb +1 -3
- data/lib/square/orders/custom_attribute_definitions/types/update_order_custom_attribute_definition_request.rb +1 -3
- data/lib/square/orders/custom_attributes/client.rb +159 -69
- data/lib/square/orders/custom_attributes/types/bulk_delete_order_custom_attributes_request.rb +1 -3
- data/lib/square/orders/custom_attributes/types/bulk_upsert_order_custom_attributes_request.rb +1 -3
- data/lib/square/orders/types/calculate_order_request.rb +1 -3
- data/lib/square/payments/client.rb +182 -70
- data/lib/square/payouts/client.rb +116 -54
- data/lib/square/refunds/client.rb +97 -40
- data/lib/square/refunds/types/refund_payment_request.rb +1 -3
- data/lib/square/sites/client.rb +26 -11
- data/lib/square/snippets/client.rb +73 -28
- data/lib/square/subscriptions/client.rb +271 -117
- data/lib/square/team/client.rb +81 -36
- data/lib/square/team_members/client.rb +119 -49
- data/lib/square/team_members/types/batch_create_team_members_request.rb +1 -3
- data/lib/square/team_members/types/batch_update_team_members_request.rb +1 -3
- data/lib/square/team_members/wage_setting/client.rb +48 -19
- data/lib/square/terminal/actions/client.rb +75 -30
- data/lib/square/terminal/checkouts/client.rb +76 -30
- data/lib/square/terminal/client.rb +60 -23
- data/lib/square/terminal/refunds/client.rb +78 -31
- data/lib/square/transfer_orders/client.rb +292 -0
- data/lib/square/transfer_orders/types/cancel_transfer_order_request.rb +13 -0
- data/lib/square/transfer_orders/types/create_transfer_order_request.rb +12 -0
- data/lib/square/transfer_orders/types/delete_transfer_orders_request.rb +12 -0
- data/lib/square/transfer_orders/types/get_transfer_orders_request.rb +11 -0
- data/lib/square/transfer_orders/types/receive_transfer_order_request.rb +14 -0
- data/lib/square/transfer_orders/types/search_transfer_orders_request.rb +13 -0
- data/lib/square/transfer_orders/types/start_transfer_order_request.rb +13 -0
- data/lib/square/transfer_orders/types/update_transfer_order_request.rb +14 -0
- data/lib/square/types/address.rb +2 -1
- data/lib/square/types/application_details.rb +1 -3
- data/lib/square/types/application_type.rb +23 -0
- data/lib/square/types/availability.rb +3 -4
- data/lib/square/types/bank_account.rb +1 -0
- data/lib/square/types/batch_create_team_members_response.rb +1 -3
- data/lib/square/types/batch_create_vendors_response.rb +1 -3
- data/lib/square/types/batch_get_catalog_objects_response.rb +1 -3
- data/lib/square/types/batch_get_vendors_response.rb +1 -3
- data/lib/square/types/batch_update_team_members_response.rb +1 -3
- data/lib/square/types/batch_update_vendors_response.rb +1 -3
- data/lib/square/types/batch_upsert_catalog_objects_response.rb +1 -3
- data/lib/square/types/batch_upsert_customer_custom_attributes_request_customer_custom_attribute_upsert_request.rb +2 -1
- data/lib/square/types/batch_upsert_customer_custom_attributes_response.rb +4 -4
- data/lib/square/types/batch_upsert_customer_custom_attributes_response_customer_custom_attribute_upsert_response.rb +3 -1
- data/lib/square/types/booking.rb +2 -6
- data/lib/square/types/booking_created_event.rb +2 -1
- data/lib/square/types/booking_custom_attribute_definition_visible_created_event.rb +2 -1
- data/lib/square/types/booking_custom_attribute_definition_visible_deleted_event.rb +2 -1
- data/lib/square/types/booking_custom_attribute_definition_visible_updated_event.rb +2 -1
- data/lib/square/types/booking_custom_attribute_delete_request.rb +4 -2
- data/lib/square/types/booking_custom_attribute_delete_response.rb +3 -1
- data/lib/square/types/booking_custom_attribute_upsert_request.rb +2 -1
- data/lib/square/types/booking_custom_attribute_upsert_response.rb +3 -1
- data/lib/square/types/booking_updated_event.rb +2 -1
- data/lib/square/types/bulk_create_customers_response.rb +1 -3
- data/lib/square/types/bulk_delete_booking_custom_attributes_response.rb +4 -4
- data/lib/square/types/bulk_delete_customers_response.rb +1 -3
- data/lib/square/types/bulk_delete_location_custom_attributes_request_location_custom_attribute_delete_request.rb +2 -1
- data/lib/square/types/bulk_delete_location_custom_attributes_response.rb +4 -4
- data/lib/square/types/bulk_delete_location_custom_attributes_response_location_custom_attribute_delete_response.rb +2 -1
- data/lib/square/types/bulk_delete_merchant_custom_attributes_request_merchant_custom_attribute_delete_request.rb +2 -1
- data/lib/square/types/bulk_delete_merchant_custom_attributes_response.rb +4 -4
- data/lib/square/types/bulk_delete_merchant_custom_attributes_response_merchant_custom_attribute_delete_response.rb +2 -1
- data/lib/square/types/bulk_delete_order_custom_attributes_response.rb +1 -3
- data/lib/square/types/bulk_publish_scheduled_shifts_response.rb +1 -3
- data/lib/square/types/bulk_retrieve_bookings_response.rb +1 -3
- data/lib/square/types/bulk_retrieve_channels_request_constants.rb +23 -0
- data/lib/square/types/bulk_retrieve_channels_response.rb +12 -0
- data/lib/square/types/bulk_retrieve_customers_response.rb +1 -3
- data/lib/square/types/bulk_retrieve_team_member_booking_profiles_response.rb +3 -4
- data/lib/square/types/bulk_update_customers_response.rb +1 -3
- data/lib/square/types/bulk_upsert_booking_custom_attributes_response.rb +4 -4
- data/lib/square/types/bulk_upsert_location_custom_attributes_request_location_custom_attribute_upsert_request.rb +2 -1
- data/lib/square/types/bulk_upsert_location_custom_attributes_response.rb +4 -4
- data/lib/square/types/bulk_upsert_location_custom_attributes_response_location_custom_attribute_upsert_response.rb +3 -1
- data/lib/square/types/bulk_upsert_merchant_custom_attributes_request_merchant_custom_attribute_upsert_request.rb +2 -1
- data/lib/square/types/bulk_upsert_merchant_custom_attributes_response.rb +4 -4
- data/lib/square/types/bulk_upsert_merchant_custom_attributes_response_merchant_custom_attribute_upsert_response.rb +3 -1
- data/lib/square/types/bulk_upsert_order_custom_attributes_response.rb +1 -3
- data/lib/square/types/business_appointment_settings.rb +4 -12
- data/lib/square/types/business_booking_profile.rb +2 -6
- data/lib/square/types/buy_now_pay_later_details.rb +1 -0
- data/lib/square/types/cancel_transfer_order_response.rb +11 -0
- data/lib/square/types/card.rb +2 -0
- data/lib/square/types/card_issuer_alert.rb +23 -0
- data/lib/square/types/catalog_category.rb +1 -3
- data/lib/square/types/catalog_custom_attribute_definition.rb +6 -18
- data/lib/square/types/catalog_custom_attribute_definition_selection_config.rb +1 -3
- data/lib/square/types/catalog_id_mapping.rb +1 -1
- data/lib/square/types/catalog_info_response.rb +1 -3
- data/lib/square/types/catalog_item.rb +6 -12
- data/lib/square/types/catalog_item_food_and_beverage_details.rb +2 -6
- data/lib/square/types/catalog_item_food_and_beverage_details_dietary_preference.rb +2 -6
- data/lib/square/types/catalog_item_food_and_beverage_details_ingredient.rb +2 -6
- data/lib/square/types/catalog_item_modifier_list_info.rb +6 -9
- data/lib/square/types/catalog_item_variation.rb +17 -13
- data/lib/square/types/catalog_modifier.rb +4 -4
- data/lib/square/types/catalog_modifier_list.rb +4 -2
- data/lib/square/types/catalog_modifier_override.rb +2 -2
- data/lib/square/types/catalog_modifier_toggle_override_type.rb +13 -0
- data/lib/square/types/catalog_object.rb +7 -3
- data/lib/square/types/catalog_object_base.rb +2 -4
- data/lib/square/types/catalog_object_category.rb +3 -4
- data/lib/square/types/catalog_object_custom_attribute_definition.rb +1 -3
- data/lib/square/types/catalog_object_quick_amounts_settings.rb +1 -3
- data/lib/square/types/catalog_object_reference.rb +1 -1
- data/lib/square/types/catalog_object_subscription_plan_variation.rb +1 -3
- data/lib/square/types/catalog_query.rb +11 -13
- data/lib/square/types/catalog_query_prefix.rb +2 -1
- data/lib/square/types/catalog_query_text.rb +2 -1
- data/lib/square/types/catalog_subscription_plan.rb +5 -5
- data/lib/square/types/catalog_subscription_plan_variation.rb +4 -2
- data/lib/square/types/catalog_v_1_id.rb +1 -1
- data/lib/square/types/catalog_version_updated_event_object.rb +1 -3
- data/lib/square/types/channel.rb +16 -0
- data/lib/square/types/channel_status.rb +12 -0
- data/lib/square/types/checkout.rb +1 -3
- data/lib/square/types/checkout_location_settings.rb +1 -3
- data/lib/square/types/checkout_location_settings_branding.rb +2 -6
- data/lib/square/types/checkout_merchant_settings.rb +1 -3
- data/lib/square/types/checkout_merchant_settings_payment_methods.rb +4 -12
- data/lib/square/types/checkout_merchant_settings_payment_methods_afterpay_clearpay.rb +2 -6
- data/lib/square/types/component.rb +4 -12
- data/lib/square/types/create_bank_account_response.rb +11 -0
- data/lib/square/types/create_booking_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/create_catalog_image_request.rb +1 -1
- data/lib/square/types/create_customer_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/create_location_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/create_merchant_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/create_order_custom_attribute_definition_response.rb +1 -3
- data/lib/square/types/create_transfer_order_data.rb +19 -0
- data/lib/square/types/create_transfer_order_line_data.rb +12 -0
- data/lib/square/types/create_transfer_order_response.rb +11 -0
- data/lib/square/types/create_webhook_subscription_response.rb +2 -1
- data/lib/square/types/custom_attribute.rb +1 -1
- data/lib/square/types/custom_attribute_definition.rb +1 -3
- data/lib/square/types/custom_attribute_definition_event_data_object.rb +1 -3
- data/lib/square/types/custom_field.rb +2 -1
- data/lib/square/types/customer_address_filter.rb +2 -1
- data/lib/square/types/customer_created_event.rb +4 -2
- data/lib/square/types/customer_created_event_event_context_merge.rb +2 -1
- data/lib/square/types/customer_creation_source_filter.rb +1 -3
- data/lib/square/types/customer_custom_attribute_filter.rb +2 -1
- data/lib/square/types/customer_custom_attribute_filter_value.rb +2 -1
- data/lib/square/types/customer_custom_attribute_filters.rb +7 -6
- data/lib/square/types/customer_custom_attribute_visible_updated_event.rb +6 -3
- data/lib/square/types/customer_deleted_event.rb +4 -2
- data/lib/square/types/customer_deleted_event_event_context_merge.rb +2 -1
- data/lib/square/types/customer_tax_ids.rb +4 -2
- data/lib/square/types/customer_updated_event.rb +4 -2
- data/lib/square/types/delete_booking_custom_attribute_definition_response.rb +5 -2
- data/lib/square/types/delete_booking_custom_attribute_response.rb +2 -1
- data/lib/square/types/delete_customer_custom_attribute_response.rb +2 -1
- data/lib/square/types/delete_location_custom_attribute_response.rb +2 -1
- data/lib/square/types/delete_merchant_custom_attribute_response.rb +2 -1
- data/lib/square/types/delete_subscription_action_response.rb +2 -1
- data/lib/square/types/delete_transfer_order_response.rb +10 -0
- data/lib/square/types/delete_webhook_subscription_response.rb +2 -1
- data/lib/square/types/destination_details.rb +1 -3
- data/lib/square/types/device_checkout_options.rb +1 -0
- data/lib/square/types/device_component_details_ethernet_details.rb +1 -1
- data/lib/square/types/device_component_details_wi_fi_details.rb +1 -1
- data/lib/square/types/digital_wallet_details.rb +1 -0
- data/lib/square/types/disable_bank_account_response.rb +11 -0
- data/lib/square/types/dispute.rb +2 -1
- data/lib/square/types/dispute_evidence_added_event.rb +2 -1
- data/lib/square/types/dispute_evidence_created_event.rb +2 -1
- data/lib/square/types/employee_wage.rb +2 -1
- data/lib/square/types/error_code.rb +2 -0
- data/lib/square/types/event_data.rb +1 -3
- data/lib/square/types/fulfillment.rb +4 -7
- data/lib/square/types/fulfillment_delivery_details.rb +1 -3
- data/lib/square/types/fulfillment_pickup_details.rb +1 -3
- data/lib/square/types/get_bank_account_response.rb +1 -1
- data/lib/square/types/get_booking_request.rb +23 -0
- data/lib/square/types/get_business_booking_profile_request.rb +23 -0
- data/lib/square/types/get_card_request.rb +23 -0
- data/lib/square/types/get_catalog_object_response.rb +1 -3
- data/lib/square/types/get_customer_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/get_customer_custom_attribute_response.rb +2 -1
- data/lib/square/types/get_customer_group_request.rb +23 -0
- data/lib/square/types/get_customer_request.rb +23 -0
- data/lib/square/types/get_customer_segment_request.rb +23 -0
- data/lib/square/types/get_dispute_evidence_request.rb +23 -0
- data/lib/square/types/get_dispute_request.rb +23 -0
- data/lib/square/types/get_employee_request.rb +23 -0
- data/lib/square/types/get_gift_card_request.rb +23 -0
- data/lib/square/types/get_inventory_adjustment_request.rb +23 -0
- data/lib/square/types/get_inventory_physical_count_request.rb +23 -0
- data/lib/square/types/get_inventory_transfer_request.rb +23 -0
- data/lib/square/types/get_location_request.rb +23 -0
- data/lib/square/types/get_loyalty_account_request.rb +23 -0
- data/lib/square/types/get_loyalty_program_request.rb +23 -0
- data/lib/square/types/get_loyalty_promotion_request.rb +23 -0
- data/lib/square/types/get_loyalty_reward_request.rb +23 -0
- data/lib/square/types/get_merchant_request.rb +23 -0
- data/lib/square/types/get_order_request.rb +23 -0
- data/lib/square/types/get_payment_link_request.rb +23 -0
- data/lib/square/types/get_snippet_request.rb +23 -0
- data/lib/square/types/get_team_member_booking_profile_request.rb +23 -0
- data/lib/square/types/get_team_member_booking_profile_response.rb +1 -3
- data/lib/square/types/get_team_member_request.rb +23 -0
- data/lib/square/types/get_transaction_request.rb +23 -0
- data/lib/square/types/get_vendor_request.rb +23 -0
- data/lib/square/types/get_wage_setting_request.rb +23 -0
- data/lib/square/types/get_webhook_subscription_request.rb +23 -0
- data/lib/square/types/get_webhook_subscription_response.rb +2 -1
- data/lib/square/types/gift_card_activity.rb +8 -24
- data/lib/square/types/gift_card_activity_block_reason.rb +23 -0
- data/lib/square/types/gift_card_activity_unblock_reason.rb +23 -0
- data/lib/square/types/gift_card_activity_updated_event.rb +2 -1
- data/lib/square/types/inventory_count_updated_event_object.rb +1 -3
- data/lib/square/types/invoice.rb +6 -13
- data/lib/square/types/invoice_accepted_payment_methods.rb +2 -1
- data/lib/square/types/invoice_attachment.rb +1 -1
- data/lib/square/types/invoice_custom_field.rb +2 -1
- data/lib/square/types/invoice_payment_made_event.rb +2 -1
- data/lib/square/types/invoice_payment_request.rb +6 -8
- data/lib/square/types/invoice_refunded_event.rb +2 -1
- data/lib/square/types/invoice_sort_field.rb +23 -0
- data/lib/square/types/labor_scheduled_shift_created_event_object.rb +1 -1
- data/lib/square/types/labor_scheduled_shift_published_event_object.rb +1 -1
- data/lib/square/types/labor_scheduled_shift_updated_event_object.rb +1 -1
- data/lib/square/types/list_bank_accounts_response.rb +1 -1
- data/lib/square/types/list_booking_custom_attribute_definitions_response.rb +4 -4
- data/lib/square/types/list_booking_custom_attributes_response.rb +3 -4
- data/lib/square/types/list_cash_drawer_shift_events_response.rb +1 -3
- data/lib/square/types/list_cash_drawer_shifts_response.rb +1 -3
- data/lib/square/types/list_channels_request_constants.rb +23 -0
- data/lib/square/types/list_channels_response.rb +11 -0
- data/lib/square/types/list_customer_custom_attribute_definitions_response.rb +4 -4
- data/lib/square/types/list_customer_custom_attributes_response.rb +3 -4
- data/lib/square/types/list_gift_card_activities_response.rb +1 -3
- data/lib/square/types/list_location_booking_profiles_response.rb +1 -3
- data/lib/square/types/list_location_custom_attribute_definitions_response.rb +4 -4
- data/lib/square/types/list_location_custom_attributes_response.rb +3 -4
- data/lib/square/types/list_loyalty_promotions_response.rb +1 -3
- data/lib/square/types/list_merchant_custom_attribute_definitions_response.rb +4 -4
- data/lib/square/types/list_merchant_custom_attributes_response.rb +3 -4
- data/lib/square/types/list_order_custom_attribute_definitions_response.rb +1 -3
- data/lib/square/types/list_order_custom_attributes_response.rb +1 -3
- data/lib/square/types/list_subscription_events_response.rb +1 -3
- data/lib/square/types/list_team_member_booking_profiles_response.rb +1 -3
- data/lib/square/types/list_team_member_wages_response.rb +1 -3
- data/lib/square/types/list_webhook_subscriptions_response.rb +1 -3
- data/lib/square/types/list_workweek_configs_response.rb +1 -3
- data/lib/square/types/location.rb +1 -3
- data/lib/square/types/location_booking_profile.rb +2 -1
- data/lib/square/types/location_custom_attribute_visible_updated_event.rb +6 -3
- data/lib/square/types/loyalty_account.rb +1 -3
- data/lib/square/types/loyalty_account_mapping_type.rb +23 -0
- data/lib/square/types/loyalty_event.rb +3 -4
- data/lib/square/types/loyalty_event_filter.rb +1 -3
- data/lib/square/types/loyalty_program.rb +4 -7
- data/lib/square/types/loyalty_program_accrual_rule.rb +3 -4
- data/lib/square/types/loyalty_program_reward_tier.rb +3 -1
- data/lib/square/types/loyalty_promotion_incentive.rb +2 -6
- data/lib/square/types/loyalty_promotion_incentive_points_addition_data.rb +2 -1
- data/lib/square/types/loyalty_promotion_incentive_points_multiplier_data.rb +2 -1
- data/lib/square/types/loyalty_promotion_trigger_limit.rb +2 -1
- data/lib/square/types/loyalty_reward.rb +4 -2
- data/lib/square/types/measurement_unit_generic.rb +23 -0
- data/lib/square/types/oauth_authorization_revoked_event_object.rb +1 -3
- data/lib/square/types/oauth_authorization_revoked_event_revocation_object.rb +1 -3
- data/lib/square/types/order.rb +2 -6
- data/lib/square/types/order_card_surcharge_treatment_type.rb +12 -0
- data/lib/square/types/order_custom_attribute_definition_owned_created_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_definition_owned_deleted_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_definition_owned_updated_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_definition_visible_created_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_definition_visible_deleted_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_definition_visible_updated_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_owned_deleted_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_owned_updated_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_visible_deleted_event.rb +2 -1
- data/lib/square/types/order_custom_attribute_visible_updated_event.rb +2 -1
- data/lib/square/types/order_fulfillment_updated.rb +1 -3
- data/lib/square/types/order_line_item.rb +4 -12
- data/lib/square/types/order_line_item_applied_tax.rb +1 -0
- data/lib/square/types/order_line_item_pricing_blocklists.rb +3 -6
- data/lib/square/types/order_line_item_pricing_blocklists_blocked_service_charge.rb +14 -0
- data/lib/square/types/order_return.rb +3 -9
- data/lib/square/types/order_return_line_item.rb +4 -12
- data/lib/square/types/order_return_service_charge.rb +3 -6
- data/lib/square/types/order_service_charge.rb +2 -6
- data/lib/square/types/payment.rb +1 -3
- data/lib/square/types/payment_link_related_resources.rb +1 -3
- data/lib/square/types/payment_refund.rb +1 -3
- data/lib/square/types/payout_entry.rb +24 -72
- data/lib/square/types/pre_populated_data.rb +2 -1
- data/lib/square/types/product_type.rb +23 -0
- data/lib/square/types/receive_transfer_order_response.rb +11 -0
- data/lib/square/types/reference.rb +10 -0
- data/lib/square/types/reference_type.rb +25 -0
- data/lib/square/types/refund.rb +1 -3
- data/lib/square/types/retrieve_booking_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/retrieve_booking_custom_attribute_response.rb +2 -1
- data/lib/square/types/retrieve_channel_response.rb +10 -0
- data/lib/square/types/retrieve_location_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/retrieve_location_custom_attribute_response.rb +2 -1
- data/lib/square/types/retrieve_merchant_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/retrieve_merchant_custom_attribute_response.rb +2 -1
- data/lib/square/types/retrieve_order_custom_attribute_definition_response.rb +1 -3
- data/lib/square/types/retrieve_transfer_order_response.rb +11 -0
- data/lib/square/types/scheduled_shift_filter.rb +3 -7
- data/lib/square/types/scheduled_shift_workday.rb +1 -3
- data/lib/square/types/search_availability_filter.rb +1 -3
- data/lib/square/types/search_catalog_items_response.rb +2 -1
- data/lib/square/types/search_catalog_objects_response.rb +1 -3
- data/lib/square/types/search_events_sort_field.rb +23 -0
- data/lib/square/types/search_loyalty_accounts_request_loyalty_account_query.rb +1 -3
- data/lib/square/types/search_loyalty_accounts_response.rb +1 -3
- data/lib/square/types/search_orders_date_time_filter.rb +2 -1
- data/lib/square/types/search_orders_fulfillment_filter.rb +2 -6
- data/lib/square/types/search_orders_source_filter.rb +2 -0
- data/lib/square/types/search_scheduled_shifts_response.rb +1 -3
- data/lib/square/types/search_transfer_orders_response.rb +12 -0
- data/lib/square/types/shift_filter.rb +3 -2
- data/lib/square/types/shift_query.rb +2 -1
- data/lib/square/types/shift_sort.rb +2 -1
- data/lib/square/types/shift_wage.rb +2 -1
- data/lib/square/types/shift_workday.rb +2 -1
- data/lib/square/types/snippet.rb +2 -1
- data/lib/square/types/standard_unit_description_group.rb +1 -3
- data/lib/square/types/start_transfer_order_response.rb +11 -0
- data/lib/square/types/subscription_event.rb +1 -3
- data/lib/square/types/subscription_phase.rb +2 -1
- data/lib/square/types/subscription_test_result.rb +5 -3
- data/lib/square/types/team_member_assigned_locations.rb +1 -3
- data/lib/square/types/team_member_booking_profile.rb +2 -1
- data/lib/square/types/tender.rb +2 -6
- data/lib/square/types/tender_buy_now_pay_later_details.rb +1 -3
- data/lib/square/types/terminal_refund.rb +2 -1
- data/lib/square/types/test_webhook_subscription_response.rb +5 -5
- data/lib/square/types/timecard_filter.rb +1 -1
- data/lib/square/types/transfer_order.rb +35 -0
- data/lib/square/types/transfer_order_created_event.rb +14 -0
- data/lib/square/types/transfer_order_created_event_data.rb +11 -0
- data/lib/square/types/transfer_order_created_event_object.rb +9 -0
- data/lib/square/types/transfer_order_deleted_event.rb +14 -0
- data/lib/square/types/transfer_order_deleted_event_data.rb +11 -0
- data/lib/square/types/transfer_order_filter.rb +12 -0
- data/lib/square/types/transfer_order_goods_receipt.rb +27 -0
- data/lib/square/types/transfer_order_goods_receipt_line_item.rb +13 -0
- data/lib/square/types/transfer_order_line.rb +18 -0
- data/lib/square/types/transfer_order_query.rb +11 -0
- data/lib/square/types/transfer_order_sort.rb +11 -0
- data/lib/square/types/transfer_order_sort_field.rb +12 -0
- data/lib/square/types/transfer_order_status.rb +15 -0
- data/lib/square/types/transfer_order_updated_event.rb +14 -0
- data/lib/square/types/transfer_order_updated_event_data.rb +11 -0
- data/lib/square/types/transfer_order_updated_event_object.rb +9 -0
- data/lib/square/types/update_booking_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/update_customer_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/update_location_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/update_merchant_custom_attribute_definition_response.rb +4 -4
- data/lib/square/types/update_order_custom_attribute_definition_response.rb +1 -3
- data/lib/square/types/update_transfer_order_data.rb +15 -0
- data/lib/square/types/update_transfer_order_line_data.rb +13 -0
- data/lib/square/types/update_transfer_order_response.rb +11 -0
- data/lib/square/types/update_webhook_subscription_response.rb +2 -1
- data/lib/square/types/update_webhook_subscription_signature_key_response.rb +3 -1
- data/lib/square/types/upsert_booking_custom_attribute_response.rb +2 -1
- data/lib/square/types/upsert_catalog_object_response.rb +1 -3
- data/lib/square/types/upsert_customer_custom_attribute_response.rb +2 -1
- data/lib/square/types/upsert_location_custom_attribute_response.rb +2 -1
- data/lib/square/types/upsert_merchant_custom_attribute_response.rb +2 -1
- data/lib/square/types/v_1_get_payment_request.rb +23 -0
- data/lib/square/types/v_1_get_settlement_request.rb +23 -0
- data/lib/square/types/v_1_order.rb +1 -3
- data/lib/square/types/vendor_created_event_object_operation.rb +23 -0
- data/lib/square/types/vendor_updated_event_object_operation.rb +23 -0
- data/lib/square/types/wage_setting.rb +1 -3
- data/lib/square/v_1_transactions/client.rb +72 -29
- data/lib/square/vendors/client.rb +126 -51
- data/lib/square/vendors/types/batch_update_vendors_request.rb +1 -3
- data/lib/square/version.rb +1 -1
- data/lib/square/webhooks/client.rb +3 -1
- data/lib/square/webhooks/event_types/client.rb +25 -14
- data/lib/square/webhooks/subscriptions/client.rb +164 -69
- data/lib/square.rb +106 -5
- data/lib/square_legacy/utilities/webhooks_helper.rb +1 -1
- data/reference.md +29588 -0
- data/wiremock/docker-compose.test.yml +14 -0
- data/wiremock/wiremock-mappings.json +1 -0
- metadata +118 -45
- data/lib/square/mobile/client.rb +0 -50
- data/lib/square/mobile/types/create_mobile_authorization_code_request.rb +0 -11
- data/lib/square/types/create_mobile_authorization_code_response.rb +0 -13
- data/test/square/integration/client_tests/test_cash_drawers.rb +0 -27
- data/test/square/integration/client_tests/test_catalog.rb +0 -704
- data/test/square/integration/client_tests/test_customers.rb +0 -65
- data/test/square/integration/client_tests/test_customers_groups.rb +0 -144
- data/test/square/integration/client_tests/test_customers_segments.rb +0 -36
- data/test/square/integration/client_tests/test_devices.rb +0 -67
- data/test/square/integration/client_tests/test_inventory.rb +0 -28
- data/test/square/integration/client_tests/test_locations.rb +0 -18
- data/test/square/integration/client_tests/test_merchants.rb +0 -40
- data/test/square/integration/client_tests/test_mobile.rb +0 -21
- data/test/square/integration/client_tests/test_orders.rb +0 -177
- data/test/square/integration/client_tests/test_payments.rb +0 -167
- data/test/square/integration/client_tests/test_refunds.rb +0 -133
- data/test/square/integration/client_tests/test_team_members.rb +0 -97
- data/test/square/integration/client_tests/test_terminal.rb +0 -107
- data/test/square/integration/integration_test_base.rb +0 -16
- data/test/square/integration/testdata/image.jpeg +0 -0
- data/test/square/internal/multipart/test_form_data.rb +0 -311
- data/test/square/internal/types/test_array.rb +0 -37
- data/test/square/internal/types/test_boolean.rb +0 -35
- data/test/square/internal/types/test_enum.rb +0 -42
- data/test/square/internal/types/test_hash.rb +0 -50
- data/test/square/internal/types/test_model.rb +0 -105
- data/test/square/internal/types/test_union.rb +0 -52
- data/test/square/internal/types/test_utils.rb +0 -216
- data/test/square_legacy/api/api_test_base.rb +0 -27
- data/test/square_legacy/api/test_catalog_api.rb +0 -57
- data/test/square_legacy/api/test_customers_api.rb +0 -43
- data/test/square_legacy/api/test_employees_api.rb +0 -34
- data/test/square_legacy/api/test_labor_api.rb +0 -82
- data/test/square_legacy/api/test_locations_api.rb +0 -22
- data/test/square_legacy/api/test_merchants_api.rb +0 -38
- data/test/square_legacy/api/test_payments_api.rb +0 -40
- data/test/square_legacy/api/test_refunds_api.rb +0 -42
- data/test/square_legacy/http_response_catcher.rb +0 -14
- data/test/square_legacy/webhooks/test_webhooks_helper.rb +0 -153
- data/test/test_helper.rb +0 -123
|
@@ -4,25 +4,17 @@ module Square
|
|
|
4
4
|
module Types
|
|
5
5
|
# The service appointment settings, including where and how the service is provided.
|
|
6
6
|
class BusinessAppointmentSettings < Internal::Types::Model
|
|
7
|
-
field :location_types,
|
|
8
|
-
|
|
9
|
-
}, optional: true, nullable: false
|
|
10
|
-
field :alignment_time, lambda {
|
|
11
|
-
Square::Types::BusinessAppointmentSettingsAlignmentTime
|
|
12
|
-
}, optional: true, nullable: false
|
|
7
|
+
field :location_types, -> { Internal::Types::Array[Square::Types::BusinessAppointmentSettingsBookingLocationType] }, optional: true, nullable: false
|
|
8
|
+
field :alignment_time, -> { Square::Types::BusinessAppointmentSettingsAlignmentTime }, optional: true, nullable: false
|
|
13
9
|
field :min_booking_lead_time_seconds, -> { Integer }, optional: true, nullable: false
|
|
14
10
|
field :max_booking_lead_time_seconds, -> { Integer }, optional: true, nullable: false
|
|
15
11
|
field :any_team_member_booking_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
16
12
|
field :multiple_service_booking_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
17
|
-
field :max_appointments_per_day_limit_type,
|
|
18
|
-
Square::Types::BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType
|
|
19
|
-
}, optional: true, nullable: false
|
|
13
|
+
field :max_appointments_per_day_limit_type, -> { Square::Types::BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType }, optional: true, nullable: false
|
|
20
14
|
field :max_appointments_per_day_limit, -> { Integer }, optional: true, nullable: false
|
|
21
15
|
field :cancellation_window_seconds, -> { Integer }, optional: true, nullable: false
|
|
22
16
|
field :cancellation_fee_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
23
|
-
field :cancellation_policy,
|
|
24
|
-
Square::Types::BusinessAppointmentSettingsCancellationPolicy
|
|
25
|
-
}, optional: true, nullable: false
|
|
17
|
+
field :cancellation_policy, -> { Square::Types::BusinessAppointmentSettingsCancellationPolicy }, optional: true, nullable: false
|
|
26
18
|
field :cancellation_policy_text, -> { String }, optional: true, nullable: false
|
|
27
19
|
field :skip_booking_flow_staff_selection, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
28
20
|
end
|
|
@@ -7,14 +7,10 @@ module Square
|
|
|
7
7
|
field :seller_id, -> { String }, optional: true, nullable: false
|
|
8
8
|
field :created_at, -> { String }, optional: true, nullable: false
|
|
9
9
|
field :booking_enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
|
-
field :customer_timezone_choice,
|
|
11
|
-
Square::Types::BusinessBookingProfileCustomerTimezoneChoice
|
|
12
|
-
}, optional: true, nullable: false
|
|
10
|
+
field :customer_timezone_choice, -> { Square::Types::BusinessBookingProfileCustomerTimezoneChoice }, optional: true, nullable: false
|
|
13
11
|
field :booking_policy, -> { Square::Types::BusinessBookingProfileBookingPolicy }, optional: true, nullable: false
|
|
14
12
|
field :allow_user_cancel, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
|
-
field :business_appointment_settings,
|
|
16
|
-
Square::Types::BusinessAppointmentSettings
|
|
17
|
-
}, optional: true, nullable: false
|
|
13
|
+
field :business_appointment_settings, -> { Square::Types::BusinessAppointmentSettings }, optional: true, nullable: false
|
|
18
14
|
field :support_seller_level_writes, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
19
15
|
end
|
|
20
16
|
end
|
|
@@ -7,6 +7,7 @@ module Square
|
|
|
7
7
|
field :brand, -> { String }, optional: true, nullable: false
|
|
8
8
|
field :afterpay_details, -> { Square::Types::AfterpayDetails }, optional: true, nullable: false
|
|
9
9
|
field :clearpay_details, -> { Square::Types::ClearpayDetails }, optional: true, nullable: false
|
|
10
|
+
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
10
11
|
end
|
|
11
12
|
end
|
|
12
13
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Response for canceling a transfer order
|
|
6
|
+
class CancelTransferOrderResponse < Internal::Types::Model
|
|
7
|
+
field :transfer_order, -> { Square::Types::TransferOrder }, optional: true, nullable: false
|
|
8
|
+
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
data/lib/square/types/card.rb
CHANGED
|
@@ -20,6 +20,8 @@ module Square
|
|
|
20
20
|
field :card_type, -> { Square::Types::CardType }, optional: true, nullable: false
|
|
21
21
|
field :prepaid_type, -> { Square::Types::CardPrepaidType }, optional: true, nullable: false
|
|
22
22
|
field :bin, -> { String }, optional: true, nullable: false
|
|
23
|
+
field :created_at, -> { String }, optional: true, nullable: false
|
|
24
|
+
field :disabled_at, -> { String }, optional: true, nullable: false
|
|
23
25
|
field :version, -> { Integer }, optional: true, nullable: false
|
|
24
26
|
field :card_co_brand, -> { Square::Types::CardCoBrand }, optional: true, nullable: false
|
|
25
27
|
field :issuer_alert, -> { String }, optional: true, nullable: false
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
module CardIssuerAlert
|
|
6
|
+
# CardIssuerAlert is an alias for Object
|
|
7
|
+
|
|
8
|
+
# @option str [String]
|
|
9
|
+
#
|
|
10
|
+
# @return [untyped]
|
|
11
|
+
def self.load(str)
|
|
12
|
+
::JSON.parse(str)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @option value [untyped]
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
def self.dump(value)
|
|
19
|
+
::JSON.generate(value)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -14,9 +14,7 @@ module Square
|
|
|
14
14
|
field :online_visibility, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
15
|
field :root_category, -> { String }, optional: true, nullable: false
|
|
16
16
|
field :ecom_seo_data, -> { Square::Types::CatalogEcomSeoData }, optional: true, nullable: false
|
|
17
|
-
field :path_to_root,
|
|
18
|
-
Internal::Types::Array[Square::Types::CategoryPathToRootNode]
|
|
19
|
-
}, optional: true, nullable: false
|
|
17
|
+
field :path_to_root, -> { Internal::Types::Array[Square::Types::CategoryPathToRootNode] }, optional: true, nullable: false
|
|
20
18
|
end
|
|
21
19
|
end
|
|
22
20
|
end
|
|
@@ -12,24 +12,12 @@ module Square
|
|
|
12
12
|
field :name, -> { String }, optional: false, nullable: false
|
|
13
13
|
field :description, -> { String }, optional: true, nullable: false
|
|
14
14
|
field :source_application, -> { Square::Types::SourceApplication }, optional: true, nullable: false
|
|
15
|
-
field :allowed_object_types,
|
|
16
|
-
|
|
17
|
-
}, optional:
|
|
18
|
-
field :
|
|
19
|
-
|
|
20
|
-
}, optional: true, nullable: false
|
|
21
|
-
field :app_visibility, lambda {
|
|
22
|
-
Square::Types::CatalogCustomAttributeDefinitionAppVisibility
|
|
23
|
-
}, optional: true, nullable: false
|
|
24
|
-
field :string_config, lambda {
|
|
25
|
-
Square::Types::CatalogCustomAttributeDefinitionStringConfig
|
|
26
|
-
}, optional: true, nullable: false
|
|
27
|
-
field :number_config, lambda {
|
|
28
|
-
Square::Types::CatalogCustomAttributeDefinitionNumberConfig
|
|
29
|
-
}, optional: true, nullable: false
|
|
30
|
-
field :selection_config, lambda {
|
|
31
|
-
Square::Types::CatalogCustomAttributeDefinitionSelectionConfig
|
|
32
|
-
}, optional: true, nullable: false
|
|
15
|
+
field :allowed_object_types, -> { Internal::Types::Array[Square::Types::CatalogObjectType] }, optional: false, nullable: false
|
|
16
|
+
field :seller_visibility, -> { Square::Types::CatalogCustomAttributeDefinitionSellerVisibility }, optional: true, nullable: false
|
|
17
|
+
field :app_visibility, -> { Square::Types::CatalogCustomAttributeDefinitionAppVisibility }, optional: true, nullable: false
|
|
18
|
+
field :string_config, -> { Square::Types::CatalogCustomAttributeDefinitionStringConfig }, optional: true, nullable: false
|
|
19
|
+
field :number_config, -> { Square::Types::CatalogCustomAttributeDefinitionNumberConfig }, optional: true, nullable: false
|
|
20
|
+
field :selection_config, -> { Square::Types::CatalogCustomAttributeDefinitionSelectionConfig }, optional: true, nullable: false
|
|
33
21
|
field :custom_attribute_usage_count, -> { Integer }, optional: true, nullable: false
|
|
34
22
|
field :key, -> { String }, optional: true, nullable: false
|
|
35
23
|
end
|
|
@@ -5,9 +5,7 @@ module Square
|
|
|
5
5
|
# Configuration associated with `SELECTION`-type custom attribute definitions.
|
|
6
6
|
class CatalogCustomAttributeDefinitionSelectionConfig < Internal::Types::Model
|
|
7
7
|
field :max_allowed_selections, -> { Integer }, optional: true, nullable: false
|
|
8
|
-
field :allowed_selections,
|
|
9
|
-
Internal::Types::Array[Square::Types::CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection]
|
|
10
|
-
}, optional: true, nullable: false
|
|
8
|
+
field :allowed_selections, -> { Internal::Types::Array[Square::Types::CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection] }, optional: true, nullable: false
|
|
11
9
|
end
|
|
12
10
|
end
|
|
13
11
|
end
|
|
@@ -15,7 +15,7 @@ module Square
|
|
|
15
15
|
# to the new object. The permanent ID is unique across the Square catalog.
|
|
16
16
|
class CatalogIdMapping < Internal::Types::Model
|
|
17
17
|
field :client_object_id, -> { String }, optional: true, nullable: false
|
|
18
|
-
field :object_id_, -> { String }, optional: true, nullable: false
|
|
18
|
+
field :object_id_, -> { String }, optional: true, nullable: false, api_name: "object_id"
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
end
|
|
@@ -5,9 +5,7 @@ module Square
|
|
|
5
5
|
class CatalogInfoResponse < Internal::Types::Model
|
|
6
6
|
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
7
7
|
field :limits, -> { Square::Types::CatalogInfoResponseLimits }, optional: true, nullable: false
|
|
8
|
-
field :standard_unit_description_group,
|
|
9
|
-
Square::Types::StandardUnitDescriptionGroup
|
|
10
|
-
}, optional: true, nullable: false
|
|
8
|
+
field :standard_unit_description_group, -> { Square::Types::StandardUnitDescriptionGroup }, optional: true, nullable: false
|
|
11
9
|
end
|
|
12
10
|
end
|
|
13
11
|
end
|
|
@@ -10,31 +10,25 @@ module Square
|
|
|
10
10
|
field :label_color, -> { String }, optional: true, nullable: false
|
|
11
11
|
field :is_taxable, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
12
12
|
field :category_id, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :buyer_facing_name, -> { String }, optional: true, nullable: false
|
|
13
14
|
field :tax_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
14
|
-
field :modifier_list_info,
|
|
15
|
-
Internal::Types::Array[Square::Types::CatalogItemModifierListInfo]
|
|
16
|
-
}, optional: true, nullable: false
|
|
15
|
+
field :modifier_list_info, -> { Internal::Types::Array[Square::Types::CatalogItemModifierListInfo] }, optional: true, nullable: false
|
|
17
16
|
field :variations, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
|
|
18
17
|
field :product_type, -> { Square::Types::CatalogItemProductType }, optional: true, nullable: false
|
|
19
18
|
field :skip_modifier_screen, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
20
|
-
field :item_options,
|
|
21
|
-
Internal::Types::Array[Square::Types::CatalogItemOptionForItem]
|
|
22
|
-
}, optional: true, nullable: false
|
|
19
|
+
field :item_options, -> { Internal::Types::Array[Square::Types::CatalogItemOptionForItem] }, optional: true, nullable: false
|
|
23
20
|
field :ecom_uri, -> { String }, optional: true, nullable: false
|
|
24
21
|
field :ecom_image_uris, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
25
22
|
field :image_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
26
23
|
field :sort_name, -> { String }, optional: true, nullable: false
|
|
27
|
-
field :categories,
|
|
28
|
-
Internal::Types::Array[Square::Types::CatalogObjectCategory]
|
|
29
|
-
}, optional: true, nullable: false
|
|
24
|
+
field :categories, -> { Internal::Types::Array[Square::Types::CatalogObjectCategory] }, optional: true, nullable: false
|
|
30
25
|
field :description_html, -> { String }, optional: true, nullable: false
|
|
31
26
|
field :description_plaintext, -> { String }, optional: true, nullable: false
|
|
27
|
+
field :kitchen_name, -> { String }, optional: true, nullable: false
|
|
32
28
|
field :channels, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
33
29
|
field :is_archived, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
34
30
|
field :ecom_seo_data, -> { Square::Types::CatalogEcomSeoData }, optional: true, nullable: false
|
|
35
|
-
field :food_and_beverage_details,
|
|
36
|
-
Square::Types::CatalogItemFoodAndBeverageDetails
|
|
37
|
-
}, optional: true, nullable: false
|
|
31
|
+
field :food_and_beverage_details, -> { Square::Types::CatalogItemFoodAndBeverageDetails }, optional: true, nullable: false
|
|
38
32
|
field :reporting_category, -> { Square::Types::CatalogObjectCategory }, optional: true, nullable: false
|
|
39
33
|
field :is_alcoholic, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
40
34
|
end
|
|
@@ -5,12 +5,8 @@ module Square
|
|
|
5
5
|
# The food and beverage-specific details of a `FOOD_AND_BEV` item.
|
|
6
6
|
class CatalogItemFoodAndBeverageDetails < Internal::Types::Model
|
|
7
7
|
field :calorie_count, -> { Integer }, optional: true, nullable: false
|
|
8
|
-
field :dietary_preferences,
|
|
9
|
-
|
|
10
|
-
}, optional: true, nullable: false
|
|
11
|
-
field :ingredients, lambda {
|
|
12
|
-
Internal::Types::Array[Square::Types::CatalogItemFoodAndBeverageDetailsIngredient]
|
|
13
|
-
}, optional: true, nullable: false
|
|
8
|
+
field :dietary_preferences, -> { Internal::Types::Array[Square::Types::CatalogItemFoodAndBeverageDetailsDietaryPreference] }, optional: true, nullable: false
|
|
9
|
+
field :ingredients, -> { Internal::Types::Array[Square::Types::CatalogItemFoodAndBeverageDetailsIngredient] }, optional: true, nullable: false
|
|
14
10
|
end
|
|
15
11
|
end
|
|
16
12
|
end
|
|
@@ -4,12 +4,8 @@ module Square
|
|
|
4
4
|
module Types
|
|
5
5
|
# Dietary preferences that can be assigned to an `FOOD_AND_BEV` item and its ingredients.
|
|
6
6
|
class CatalogItemFoodAndBeverageDetailsDietaryPreference < Internal::Types::Model
|
|
7
|
-
field :type,
|
|
8
|
-
|
|
9
|
-
}, optional: true, nullable: false
|
|
10
|
-
field :standard_name, lambda {
|
|
11
|
-
Square::Types::CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference
|
|
12
|
-
}, optional: true, nullable: false
|
|
7
|
+
field :type, -> { Square::Types::CatalogItemFoodAndBeverageDetailsDietaryPreferenceType }, optional: true, nullable: false
|
|
8
|
+
field :standard_name, -> { Square::Types::CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference }, optional: true, nullable: false
|
|
13
9
|
field :custom_name, -> { String }, optional: true, nullable: false
|
|
14
10
|
end
|
|
15
11
|
end
|
|
@@ -4,12 +4,8 @@ module Square
|
|
|
4
4
|
module Types
|
|
5
5
|
# Describes the ingredient used in a `FOOD_AND_BEV` item.
|
|
6
6
|
class CatalogItemFoodAndBeverageDetailsIngredient < Internal::Types::Model
|
|
7
|
-
field :type,
|
|
8
|
-
|
|
9
|
-
}, optional: true, nullable: false
|
|
10
|
-
field :standard_name, lambda {
|
|
11
|
-
Square::Types::CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient
|
|
12
|
-
}, optional: true, nullable: false
|
|
7
|
+
field :type, -> { Square::Types::CatalogItemFoodAndBeverageDetailsDietaryPreferenceType }, optional: true, nullable: false
|
|
8
|
+
field :standard_name, -> { Square::Types::CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient }, optional: true, nullable: false
|
|
13
9
|
field :custom_name, -> { String }, optional: true, nullable: false
|
|
14
10
|
end
|
|
15
11
|
end
|
|
@@ -2,22 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Controls how a modifier list is applied to a specific item. This object allows for item-specific customization of
|
|
5
|
+
# Controls how a modifier list is applied to a specific item. This object allows for item-specific customization of
|
|
6
|
+
# modifier list behavior
|
|
6
7
|
# and provides the ability to override global modifier list settings.
|
|
7
8
|
class CatalogItemModifierListInfo < Internal::Types::Model
|
|
8
9
|
field :modifier_list_id, -> { String }, optional: false, nullable: false
|
|
9
|
-
field :modifier_overrides,
|
|
10
|
-
Internal::Types::Array[Square::Types::CatalogModifierOverride]
|
|
11
|
-
}, optional: true, nullable: false
|
|
10
|
+
field :modifier_overrides, -> { Internal::Types::Array[Square::Types::CatalogModifierOverride] }, optional: true, nullable: false
|
|
12
11
|
field :min_selected_modifiers, -> { Integer }, optional: true, nullable: false
|
|
13
12
|
field :max_selected_modifiers, -> { Integer }, optional: true, nullable: false
|
|
14
13
|
field :enabled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
14
|
field :ordinal, -> { Integer }, optional: true, nullable: false
|
|
16
|
-
field :allow_quantities, -> {
|
|
17
|
-
field :is_conversational, -> {
|
|
18
|
-
field :hidden_from_customer_override,
|
|
19
|
-
Internal::Types::Hash[String, Object]
|
|
20
|
-
}, optional: true, nullable: false
|
|
15
|
+
field :allow_quantities, -> { Square::Types::CatalogModifierToggleOverrideType }, optional: true, nullable: false
|
|
16
|
+
field :is_conversational, -> { Square::Types::CatalogModifierToggleOverrideType }, optional: true, nullable: false
|
|
17
|
+
field :hidden_from_customer_override, -> { Square::Types::CatalogModifierToggleOverrideType }, optional: true, nullable: false
|
|
21
18
|
end
|
|
22
19
|
end
|
|
23
20
|
end
|
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# An item variation, representing a product for sale, in the Catalog object model. Each [item](entity:CatalogItem)
|
|
5
|
+
# An item variation, representing a product for sale, in the Catalog object model. Each [item](entity:CatalogItem)
|
|
6
|
+
# must have at least one
|
|
6
7
|
# item variation and can have at most 250 item variations.
|
|
7
8
|
#
|
|
8
|
-
# An item variation can be sellable, stockable, or both if it has a unit of measure for its count for the sold
|
|
9
|
-
# number of the variation,
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
9
|
+
# An item variation can be sellable, stockable, or both if it has a unit of measure for its count for the sold
|
|
10
|
+
# number of the variation, the stocked
|
|
11
|
+
# number of the variation, or both. For example, when a variation representing wine is stocked and sold by the
|
|
12
|
+
# bottle, the variation is both
|
|
13
|
+
# stockable and sellable. But when a variation of the wine is sold by the glass, the sold units cannot be used as a
|
|
14
|
+
# measure of the stocked units. This by-the-glass
|
|
15
|
+
# variation is sellable, but not stockable. To accurately keep track of the wine's inventory count at any time, the
|
|
16
|
+
# sellable count must be
|
|
17
|
+
# converted to stockable count. Typically, the seller defines this unit conversion. For example, 1 bottle equals 5
|
|
18
|
+
# glasses. The Square API exposes
|
|
19
|
+
# the `stockable_conversion` property on the variation to specify the conversion. Thus, when two glasses of the wine
|
|
20
|
+
# are sold, the sellable count
|
|
14
21
|
# decreases by 2, and the stockable count automatically decreases by 0.4 bottle according to the conversion.
|
|
15
22
|
class CatalogItemVariation < Internal::Types::Model
|
|
16
23
|
field :item_id, -> { String }, optional: true, nullable: false
|
|
@@ -20,24 +27,21 @@ module Square
|
|
|
20
27
|
field :ordinal, -> { Integer }, optional: true, nullable: false
|
|
21
28
|
field :pricing_type, -> { Square::Types::CatalogPricingType }, optional: true, nullable: false
|
|
22
29
|
field :price_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
23
|
-
field :location_overrides,
|
|
24
|
-
Internal::Types::Array[Square::Types::ItemVariationLocationOverrides]
|
|
25
|
-
}, optional: true, nullable: false
|
|
30
|
+
field :location_overrides, -> { Internal::Types::Array[Square::Types::ItemVariationLocationOverrides] }, optional: true, nullable: false
|
|
26
31
|
field :track_inventory, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
27
32
|
field :inventory_alert_type, -> { Square::Types::InventoryAlertType }, optional: true, nullable: false
|
|
28
33
|
field :inventory_alert_threshold, -> { Integer }, optional: true, nullable: false
|
|
29
34
|
field :user_data, -> { String }, optional: true, nullable: false
|
|
30
35
|
field :service_duration, -> { Integer }, optional: true, nullable: false
|
|
31
36
|
field :available_for_booking, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
32
|
-
field :item_option_values,
|
|
33
|
-
Internal::Types::Array[Square::Types::CatalogItemOptionValueForItemVariation]
|
|
34
|
-
}, optional: true, nullable: false
|
|
37
|
+
field :item_option_values, -> { Internal::Types::Array[Square::Types::CatalogItemOptionValueForItemVariation] }, optional: true, nullable: false
|
|
35
38
|
field :measurement_unit_id, -> { String }, optional: true, nullable: false
|
|
36
39
|
field :sellable, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
37
40
|
field :stockable, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
38
41
|
field :image_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
39
42
|
field :team_member_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
40
43
|
field :stockable_conversion, -> { Square::Types::CatalogStockConversion }, optional: true, nullable: false
|
|
44
|
+
field :kitchen_name, -> { String }, optional: true, nullable: false
|
|
41
45
|
end
|
|
42
46
|
end
|
|
43
47
|
end
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# A modifier that can be applied to items at the time of sale. For example, a cheese modifier for a burger, or a
|
|
5
|
+
# A modifier that can be applied to items at the time of sale. For example, a cheese modifier for a burger, or a
|
|
6
|
+
# flavor modifier for a serving of ice cream.
|
|
6
7
|
class CatalogModifier < Internal::Types::Model
|
|
7
8
|
field :name, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :price_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
9
10
|
field :on_by_default, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
11
|
field :ordinal, -> { Integer }, optional: true, nullable: false
|
|
11
12
|
field :modifier_list_id, -> { String }, optional: true, nullable: false
|
|
12
|
-
field :location_overrides,
|
|
13
|
-
|
|
14
|
-
}, optional: true, nullable: false
|
|
13
|
+
field :location_overrides, -> { Internal::Types::Array[Square::Types::ModifierLocationOverrides] }, optional: true, nullable: false
|
|
14
|
+
field :kitchen_name, -> { String }, optional: true, nullable: false
|
|
15
15
|
field :image_id, -> { String }, optional: true, nullable: false
|
|
16
16
|
field :hidden_online, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
17
17
|
end
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
5
|
# A container for a list of modifiers, or a text-based modifier.
|
|
6
|
-
# For text-based modifiers, this represents text configuration for an item. (For example, custom text to print on a
|
|
7
|
-
#
|
|
6
|
+
# For text-based modifiers, this represents text configuration for an item. (For example, custom text to print on a
|
|
7
|
+
# t-shirt).
|
|
8
|
+
# For non text-based modifiers, this represents a list of modifiers that can be applied to items at the time of
|
|
9
|
+
# sale.
|
|
8
10
|
# (For example, a list of condiments for a hot dog, or a list of ice cream flavors).
|
|
9
11
|
# Each element of the modifier list is a `CatalogObject` instance of the `MODIFIER` type.
|
|
10
12
|
class CatalogModifierList < Internal::Types::Model
|
|
@@ -6,8 +6,8 @@ module Square
|
|
|
6
6
|
class CatalogModifierOverride < Internal::Types::Model
|
|
7
7
|
field :modifier_id, -> { String }, optional: false, nullable: false
|
|
8
8
|
field :on_by_default, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
9
|
-
field :hidden_online_override, -> {
|
|
10
|
-
field :on_by_default_override, -> {
|
|
9
|
+
field :hidden_online_override, -> { Square::Types::CatalogModifierToggleOverrideType }, optional: true, nullable: false
|
|
10
|
+
field :on_by_default_override, -> { Square::Types::CatalogModifierToggleOverrideType }, optional: true, nullable: false
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -4,11 +4,15 @@ module Square
|
|
|
4
4
|
module Types
|
|
5
5
|
# The wrapper object for the catalog entries of a given object type.
|
|
6
6
|
#
|
|
7
|
-
# Depending on the `type` attribute value, a `CatalogObject` instance assumes a type-specific data to yield the
|
|
7
|
+
# Depending on the `type` attribute value, a `CatalogObject` instance assumes a type-specific data to yield the
|
|
8
|
+
# corresponding type of catalog object.
|
|
8
9
|
#
|
|
9
|
-
# For example, if `type=ITEM`, the `CatalogObject` instance must have the ITEM-specific data set on the `item_data`
|
|
10
|
+
# For example, if `type=ITEM`, the `CatalogObject` instance must have the ITEM-specific data set on the `item_data`
|
|
11
|
+
# attribute. The resulting `CatalogObject` instance is also a `CatalogItem` instance.
|
|
10
12
|
#
|
|
11
|
-
# In general, if `type=<OBJECT_TYPE>`, the `CatalogObject` instance must have the `<OBJECT_TYPE>`-specific data set
|
|
13
|
+
# In general, if `type=<OBJECT_TYPE>`, the `CatalogObject` instance must have the `<OBJECT_TYPE>`-specific data set
|
|
14
|
+
# on the `<object_type>_data` attribute. The resulting `CatalogObject` instance is also a `Catalog<ObjectType>`
|
|
15
|
+
# instance.
|
|
12
16
|
#
|
|
13
17
|
# For a more detailed discussion of the Catalog data model, please see the
|
|
14
18
|
# [Design a Catalog](https://developer.squareup.com/docs/catalog-api/design-a-catalog) guide.
|
|
@@ -7,10 +7,8 @@ module Square
|
|
|
7
7
|
field :updated_at, -> { String }, optional: true, nullable: false
|
|
8
8
|
field :version, -> { Integer }, optional: true, nullable: false
|
|
9
9
|
field :is_deleted, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
10
|
-
field :custom_attribute_values,
|
|
11
|
-
|
|
12
|
-
}, optional: true, nullable: false
|
|
13
|
-
field :catalog_v_1_ids, -> { Internal::Types::Array[Square::Types::CatalogV1Id] }, optional: true, nullable: false
|
|
10
|
+
field :custom_attribute_values, -> { Internal::Types::Hash[String, Square::Types::CatalogCustomAttributeValue] }, optional: true, nullable: false
|
|
11
|
+
field :catalog_v_1_ids, -> { Internal::Types::Array[Square::Types::CatalogV1Id] }, optional: true, nullable: false, api_name: "catalog_v1_ids"
|
|
14
12
|
field :present_at_all_locations, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
13
|
field :present_at_location_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
16
14
|
field :absent_at_location_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
@@ -8,14 +8,13 @@ module Square
|
|
|
8
8
|
class CatalogObjectCategory < Internal::Types::Model
|
|
9
9
|
field :id, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :ordinal, -> { Integer }, optional: true, nullable: false
|
|
11
|
+
field :type, -> { String }, optional: true, nullable: false
|
|
11
12
|
field :category_data, -> { Square::Types::CatalogCategory }, optional: true, nullable: false
|
|
12
13
|
field :updated_at, -> { String }, optional: true, nullable: false
|
|
13
14
|
field :version, -> { Integer }, optional: true, nullable: false
|
|
14
15
|
field :is_deleted, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
|
-
field :custom_attribute_values,
|
|
16
|
-
|
|
17
|
-
}, optional: true, nullable: false
|
|
18
|
-
field :catalog_v_1_ids, -> { Internal::Types::Array[Square::Types::CatalogV1Id] }, optional: true, nullable: false
|
|
16
|
+
field :custom_attribute_values, -> { Internal::Types::Hash[String, Square::Types::CatalogCustomAttributeValue] }, optional: true, nullable: false
|
|
17
|
+
field :catalog_v_1_ids, -> { Internal::Types::Array[Square::Types::CatalogV1Id] }, optional: true, nullable: false, api_name: "catalog_v1_ids"
|
|
19
18
|
field :present_at_all_locations, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
20
19
|
field :present_at_location_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
21
20
|
field :absent_at_location_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
5
|
class CatalogObjectCustomAttributeDefinition < Internal::Types::Model
|
|
6
|
-
field :custom_attribute_definition_data,
|
|
7
|
-
Square::Types::CatalogCustomAttributeDefinition
|
|
8
|
-
}, optional: true, nullable: false
|
|
6
|
+
field :custom_attribute_definition_data, -> { Square::Types::CatalogCustomAttributeDefinition }, optional: true, nullable: false
|
|
9
7
|
end
|
|
10
8
|
end
|
|
11
9
|
end
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
5
|
class CatalogObjectQuickAmountsSettings < Internal::Types::Model
|
|
6
|
-
field :quick_amounts_settings_data,
|
|
7
|
-
Square::Types::CatalogQuickAmountsSettings
|
|
8
|
-
}, optional: true, nullable: false
|
|
6
|
+
field :quick_amounts_settings_data, -> { Square::Types::CatalogQuickAmountsSettings }, optional: true, nullable: false
|
|
9
7
|
end
|
|
10
8
|
end
|
|
11
9
|
end
|
|
@@ -6,7 +6,7 @@ module Square
|
|
|
6
6
|
# used as an entry point into a graph of catalog objects, where the objects exist
|
|
7
7
|
# at a specific version.
|
|
8
8
|
class CatalogObjectReference < Internal::Types::Model
|
|
9
|
-
field :object_id_, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :object_id_, -> { String }, optional: true, nullable: false, api_name: "object_id"
|
|
10
10
|
field :catalog_version, -> { Integer }, optional: true, nullable: false
|
|
11
11
|
end
|
|
12
12
|
end
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
5
|
class CatalogObjectSubscriptionPlanVariation < Internal::Types::Model
|
|
6
|
-
field :subscription_plan_variation_data,
|
|
7
|
-
Square::Types::CatalogSubscriptionPlanVariation
|
|
8
|
-
}, optional: true, nullable: false
|
|
6
|
+
field :subscription_plan_variation_data, -> { Square::Types::CatalogSubscriptionPlanVariation }, optional: true, nullable: false
|
|
9
7
|
end
|
|
10
8
|
end
|
|
11
9
|
end
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# A query composed of one or more different types of filters to narrow the scope of targeted objects when calling
|
|
5
|
+
# A query composed of one or more different types of filters to narrow the scope of targeted objects when calling
|
|
6
|
+
# the `SearchCatalogObjects` endpoint.
|
|
6
7
|
#
|
|
7
|
-
# Although a query can have multiple filters, only certain query types can be combined per call to
|
|
8
|
+
# Although a query can have multiple filters, only certain query types can be combined per call to
|
|
9
|
+
# [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects).
|
|
8
10
|
# Any combination of the following types may be used together:
|
|
9
11
|
# - [exact_query](entity:CatalogQueryExact)
|
|
10
12
|
# - [prefix_query](entity:CatalogQueryPrefix)
|
|
@@ -15,10 +17,12 @@ module Square
|
|
|
15
17
|
# All other query types cannot be combined with any others.
|
|
16
18
|
#
|
|
17
19
|
# When a query filter is based on an attribute, the attribute must be searchable.
|
|
18
|
-
# Searchable attributes are listed as follows, along their parent types that can be searched for with applicable
|
|
20
|
+
# Searchable attributes are listed as follows, along their parent types that can be searched for with applicable
|
|
21
|
+
# query filters.
|
|
19
22
|
#
|
|
20
23
|
# Searchable attribute and objects queryable by searchable attributes:
|
|
21
|
-
# - `name`: `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, `CatalogTax`, `CatalogDiscount`,
|
|
24
|
+
# - `name`: `CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, `CatalogTax`, `CatalogDiscount`,
|
|
25
|
+
# `CatalogModifier`, `CatalogModifierList`, `CatalogItemOption`, `CatalogItemOptionValue`
|
|
22
26
|
# - `description`: `CatalogItem`, `CatalogItemOptionValue`
|
|
23
27
|
# - `abbreviation`: `CatalogItem`
|
|
24
28
|
# - `upc`: `CatalogItemVariation`
|
|
@@ -36,15 +40,9 @@ module Square
|
|
|
36
40
|
field :range_query, -> { Square::Types::CatalogQueryRange }, optional: true, nullable: false
|
|
37
41
|
field :text_query, -> { Square::Types::CatalogQueryText }, optional: true, nullable: false
|
|
38
42
|
field :items_for_tax_query, -> { Square::Types::CatalogQueryItemsForTax }, optional: true, nullable: false
|
|
39
|
-
field :items_for_modifier_list_query,
|
|
40
|
-
|
|
41
|
-
}, optional: true, nullable: false
|
|
42
|
-
field :items_for_item_options_query, lambda {
|
|
43
|
-
Square::Types::CatalogQueryItemsForItemOptions
|
|
44
|
-
}, optional: true, nullable: false
|
|
45
|
-
field :item_variations_for_item_option_values_query, lambda {
|
|
46
|
-
Square::Types::CatalogQueryItemVariationsForItemOptionValues
|
|
47
|
-
}, optional: true, nullable: false
|
|
43
|
+
field :items_for_modifier_list_query, -> { Square::Types::CatalogQueryItemsForModifierList }, optional: true, nullable: false
|
|
44
|
+
field :items_for_item_options_query, -> { Square::Types::CatalogQueryItemsForItemOptions }, optional: true, nullable: false
|
|
45
|
+
field :item_variations_for_item_option_values_query, -> { Square::Types::CatalogQueryItemVariationsForItemOptionValues }, optional: true, nullable: false
|
|
48
46
|
end
|
|
49
47
|
end
|
|
50
48
|
end
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# The query filter to return the search result whose named attribute values are prefixed by the specified attribute
|
|
5
|
+
# The query filter to return the search result whose named attribute values are prefixed by the specified attribute
|
|
6
|
+
# value.
|
|
6
7
|
class CatalogQueryPrefix < Internal::Types::Model
|
|
7
8
|
field :attribute_name, -> { String }, optional: false, nullable: false
|
|
8
9
|
field :attribute_prefix, -> { String }, optional: false, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# The query filter to return the search result whose searchable attribute values contain all of the specified
|
|
5
|
+
# The query filter to return the search result whose searchable attribute values contain all of the specified
|
|
6
|
+
# keywords or tokens, independent of the token order or case.
|
|
6
7
|
class CatalogQueryText < Internal::Types::Model
|
|
7
8
|
field :keywords, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
8
9
|
end
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Describes a subscription plan. A subscription plan represents what you want to sell in a subscription model, and
|
|
6
|
-
#
|
|
5
|
+
# Describes a subscription plan. A subscription plan represents what you want to sell in a subscription model, and
|
|
6
|
+
# includes references to each of the associated subscription plan variations.
|
|
7
|
+
# For more information, see [Subscription Plans and
|
|
8
|
+
# Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).
|
|
7
9
|
class CatalogSubscriptionPlan < Internal::Types::Model
|
|
8
10
|
field :name, -> { String }, optional: false, nullable: false
|
|
9
11
|
field :phases, -> { Internal::Types::Array[Square::Types::SubscriptionPhase] }, optional: true, nullable: false
|
|
10
|
-
field :subscription_plan_variations,
|
|
11
|
-
Internal::Types::Array[Square::Types::CatalogObject]
|
|
12
|
-
}, optional: true, nullable: false
|
|
12
|
+
field :subscription_plan_variations, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
|
|
13
13
|
field :eligible_item_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
14
14
|
field :eligible_category_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
15
15
|
field :all_items, -> { Internal::Types::Boolean }, optional: true, nullable: false
|