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
data/lib/square/types/order.rb
CHANGED
|
@@ -16,12 +16,8 @@ module Square
|
|
|
16
16
|
field :customer_id, -> { String }, optional: true, nullable: false
|
|
17
17
|
field :line_items, -> { Internal::Types::Array[Square::Types::OrderLineItem] }, optional: true, nullable: false
|
|
18
18
|
field :taxes, -> { Internal::Types::Array[Square::Types::OrderLineItemTax] }, optional: true, nullable: false
|
|
19
|
-
field :discounts,
|
|
20
|
-
|
|
21
|
-
}, optional: true, nullable: false
|
|
22
|
-
field :service_charges, lambda {
|
|
23
|
-
Internal::Types::Array[Square::Types::OrderServiceCharge]
|
|
24
|
-
}, optional: true, nullable: false
|
|
19
|
+
field :discounts, -> { Internal::Types::Array[Square::Types::OrderLineItemDiscount] }, optional: true, nullable: false
|
|
20
|
+
field :service_charges, -> { Internal::Types::Array[Square::Types::OrderServiceCharge] }, optional: true, nullable: false
|
|
25
21
|
field :fulfillments, -> { Internal::Types::Array[Square::Types::Fulfillment] }, optional: true, nullable: false
|
|
26
22
|
field :returns, -> { Internal::Types::Array[Square::Types::OrderReturn] }, optional: true, nullable: false
|
|
27
23
|
field :return_amounts, -> { Square::Types::OrderMoneyAmounts }, optional: true, nullable: false
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
module OrderCardSurchargeTreatmentType
|
|
6
|
+
extend Square::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
LINE_ITEM_TREATMENT = "LINE_ITEM_TREATMENT"
|
|
9
|
+
APPORTIONED_TREATMENT = "APPORTIONED_TREATMENT"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the
|
|
5
|
+
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the
|
|
6
|
+
# subscribing app is created.
|
|
6
7
|
class OrderCustomAttributeDefinitionOwnedCreatedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the
|
|
5
|
+
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the
|
|
6
|
+
# subscribing app is deleted.
|
|
6
7
|
class OrderCustomAttributeDefinitionOwnedDeletedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the
|
|
5
|
+
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is owned by the
|
|
6
|
+
# subscribing app is updated.
|
|
6
7
|
class OrderCustomAttributeDefinitionOwnedUpdatedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the
|
|
5
|
+
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the
|
|
6
|
+
# subscribing app is created.
|
|
6
7
|
class OrderCustomAttributeDefinitionVisibleCreatedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the
|
|
5
|
+
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the
|
|
6
|
+
# subscribing app is deleted.
|
|
6
7
|
class OrderCustomAttributeDefinitionVisibleDeletedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the
|
|
5
|
+
# Published when an order [custom attribute definition](entity:CustomAttributeDefinition) that is visible to the
|
|
6
|
+
# subscribing app is updated.
|
|
6
7
|
class OrderCustomAttributeDefinitionVisibleUpdatedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute](entity:CustomAttribute) associated with a [custom attribute
|
|
5
|
+
# Published when an order [custom attribute](entity:CustomAttribute) associated with a [custom attribute
|
|
6
|
+
# definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is deleted.
|
|
6
7
|
class OrderCustomAttributeOwnedDeletedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute](entity:CustomAttribute) associated with a [custom attribute
|
|
5
|
+
# Published when an order [custom attribute](entity:CustomAttribute) associated with a [custom attribute
|
|
6
|
+
# definition](entity:CustomAttributeDefinition) that is owned by the subscribing app is updated.
|
|
6
7
|
class OrderCustomAttributeOwnedUpdatedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute](entity:CustomAttribute) that is visible to the subscribing app is
|
|
5
|
+
# Published when an order [custom attribute](entity:CustomAttribute) that is visible to the subscribing app is
|
|
6
|
+
# deleted.
|
|
6
7
|
class OrderCustomAttributeVisibleDeletedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Published when an order [custom attribute](entity:CustomAttribute) that is visible to the subscribing app is
|
|
5
|
+
# Published when an order [custom attribute](entity:CustomAttribute) that is visible to the subscribing app is
|
|
6
|
+
# updated.
|
|
6
7
|
class OrderCustomAttributeVisibleUpdatedEvent < Internal::Types::Model
|
|
7
8
|
field :merchant_id, -> { String }, optional: true, nullable: false
|
|
8
9
|
field :type, -> { String }, optional: true, nullable: false
|
|
@@ -9,9 +9,7 @@ module Square
|
|
|
9
9
|
field :state, -> { Square::Types::OrderState }, optional: true, nullable: false
|
|
10
10
|
field :created_at, -> { String }, optional: true, nullable: false
|
|
11
11
|
field :updated_at, -> { String }, optional: true, nullable: false
|
|
12
|
-
field :fulfillment_update,
|
|
13
|
-
Internal::Types::Array[Square::Types::OrderFulfillmentUpdatedUpdate]
|
|
14
|
-
}, optional: true, nullable: false
|
|
12
|
+
field :fulfillment_update, -> { Internal::Types::Array[Square::Types::OrderFulfillmentUpdatedUpdate] }, optional: true, nullable: false
|
|
15
13
|
end
|
|
16
14
|
end
|
|
17
15
|
end
|
|
@@ -15,18 +15,10 @@ module Square
|
|
|
15
15
|
field :variation_name, -> { String }, optional: true, nullable: false
|
|
16
16
|
field :item_type, -> { Square::Types::OrderLineItemItemType }, optional: true, nullable: false
|
|
17
17
|
field :metadata, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
18
|
-
field :modifiers,
|
|
19
|
-
|
|
20
|
-
}, optional: true, nullable: false
|
|
21
|
-
field :
|
|
22
|
-
Internal::Types::Array[Square::Types::OrderLineItemAppliedTax]
|
|
23
|
-
}, optional: true, nullable: false
|
|
24
|
-
field :applied_discounts, lambda {
|
|
25
|
-
Internal::Types::Array[Square::Types::OrderLineItemAppliedDiscount]
|
|
26
|
-
}, optional: true, nullable: false
|
|
27
|
-
field :applied_service_charges, lambda {
|
|
28
|
-
Internal::Types::Array[Square::Types::OrderLineItemAppliedServiceCharge]
|
|
29
|
-
}, optional: true, nullable: false
|
|
18
|
+
field :modifiers, -> { Internal::Types::Array[Square::Types::OrderLineItemModifier] }, optional: true, nullable: false
|
|
19
|
+
field :applied_taxes, -> { Internal::Types::Array[Square::Types::OrderLineItemAppliedTax] }, optional: true, nullable: false
|
|
20
|
+
field :applied_discounts, -> { Internal::Types::Array[Square::Types::OrderLineItemAppliedDiscount] }, optional: true, nullable: false
|
|
21
|
+
field :applied_service_charges, -> { Internal::Types::Array[Square::Types::OrderLineItemAppliedServiceCharge] }, optional: true, nullable: false
|
|
30
22
|
field :base_price_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
31
23
|
field :variation_total_price_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
32
24
|
field :gross_sales_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
@@ -12,6 +12,7 @@ module Square
|
|
|
12
12
|
field :uid, -> { String }, optional: true, nullable: false
|
|
13
13
|
field :tax_uid, -> { String }, optional: false, nullable: false
|
|
14
14
|
field :applied_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
15
|
+
field :auto_applied, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
end
|
|
@@ -6,12 +6,9 @@ module Square
|
|
|
6
6
|
# application to a line item. For more information, see
|
|
7
7
|
# [Apply Taxes and Discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts).
|
|
8
8
|
class OrderLineItemPricingBlocklists < Internal::Types::Model
|
|
9
|
-
field :blocked_discounts,
|
|
10
|
-
|
|
11
|
-
}, optional: true, nullable: false
|
|
12
|
-
field :blocked_taxes, lambda {
|
|
13
|
-
Internal::Types::Array[Square::Types::OrderLineItemPricingBlocklistsBlockedTax]
|
|
14
|
-
}, optional: true, nullable: false
|
|
9
|
+
field :blocked_discounts, -> { Internal::Types::Array[Square::Types::OrderLineItemPricingBlocklistsBlockedDiscount] }, optional: true, nullable: false
|
|
10
|
+
field :blocked_taxes, -> { Internal::Types::Array[Square::Types::OrderLineItemPricingBlocklistsBlockedTax] }, optional: true, nullable: false
|
|
11
|
+
field :blocked_service_charges, -> { Internal::Types::Array[Square::Types::OrderLineItemPricingBlocklistsBlockedServiceCharge] }, optional: true, nullable: false
|
|
15
12
|
end
|
|
16
13
|
end
|
|
17
14
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# A service charge to block from applying to a line item. The service charge
|
|
6
|
+
# must be identified by either `service_charge_uid` or
|
|
7
|
+
# `service_charge_catalog_object_id`, but not both.
|
|
8
|
+
class OrderLineItemPricingBlocklistsBlockedServiceCharge < Internal::Types::Model
|
|
9
|
+
field :uid, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :service_charge_uid, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :service_charge_catalog_object_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -6,16 +6,10 @@ module Square
|
|
|
6
6
|
class OrderReturn < Internal::Types::Model
|
|
7
7
|
field :uid, -> { String }, optional: true, nullable: false
|
|
8
8
|
field :source_order_id, -> { String }, optional: true, nullable: false
|
|
9
|
-
field :return_line_items,
|
|
10
|
-
|
|
11
|
-
}, optional: true, nullable: false
|
|
12
|
-
field :return_service_charges, lambda {
|
|
13
|
-
Internal::Types::Array[Square::Types::OrderReturnServiceCharge]
|
|
14
|
-
}, optional: true, nullable: false
|
|
9
|
+
field :return_line_items, -> { Internal::Types::Array[Square::Types::OrderReturnLineItem] }, optional: true, nullable: false
|
|
10
|
+
field :return_service_charges, -> { Internal::Types::Array[Square::Types::OrderReturnServiceCharge] }, optional: true, nullable: false
|
|
15
11
|
field :return_taxes, -> { Internal::Types::Array[Square::Types::OrderReturnTax] }, optional: true, nullable: false
|
|
16
|
-
field :return_discounts,
|
|
17
|
-
Internal::Types::Array[Square::Types::OrderReturnDiscount]
|
|
18
|
-
}, optional: true, nullable: false
|
|
12
|
+
field :return_discounts, -> { Internal::Types::Array[Square::Types::OrderReturnDiscount] }, optional: true, nullable: false
|
|
19
13
|
field :return_tips, -> { Internal::Types::Array[Square::Types::OrderReturnTip] }, optional: true, nullable: false
|
|
20
14
|
field :rounding_adjustment, -> { Square::Types::OrderRoundingAdjustment }, optional: true, nullable: false
|
|
21
15
|
field :return_amounts, -> { Square::Types::OrderMoneyAmounts }, optional: true, nullable: false
|
|
@@ -14,24 +14,16 @@ module Square
|
|
|
14
14
|
field :catalog_version, -> { Integer }, optional: true, nullable: false
|
|
15
15
|
field :variation_name, -> { String }, optional: true, nullable: false
|
|
16
16
|
field :item_type, -> { Square::Types::OrderLineItemItemType }, optional: true, nullable: false
|
|
17
|
-
field :return_modifiers,
|
|
18
|
-
|
|
19
|
-
}, optional: true, nullable: false
|
|
20
|
-
field :applied_taxes, lambda {
|
|
21
|
-
Internal::Types::Array[Square::Types::OrderLineItemAppliedTax]
|
|
22
|
-
}, optional: true, nullable: false
|
|
23
|
-
field :applied_discounts, lambda {
|
|
24
|
-
Internal::Types::Array[Square::Types::OrderLineItemAppliedDiscount]
|
|
25
|
-
}, optional: true, nullable: false
|
|
17
|
+
field :return_modifiers, -> { Internal::Types::Array[Square::Types::OrderReturnLineItemModifier] }, optional: true, nullable: false
|
|
18
|
+
field :applied_taxes, -> { Internal::Types::Array[Square::Types::OrderLineItemAppliedTax] }, optional: true, nullable: false
|
|
19
|
+
field :applied_discounts, -> { Internal::Types::Array[Square::Types::OrderLineItemAppliedDiscount] }, optional: true, nullable: false
|
|
26
20
|
field :base_price_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
27
21
|
field :variation_total_price_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
28
22
|
field :gross_return_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
29
23
|
field :total_tax_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
30
24
|
field :total_discount_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
31
25
|
field :total_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
32
|
-
field :applied_service_charges,
|
|
33
|
-
Internal::Types::Array[Square::Types::OrderLineItemAppliedServiceCharge]
|
|
34
|
-
}, optional: true, nullable: false
|
|
26
|
+
field :applied_service_charges, -> { Internal::Types::Array[Square::Types::OrderLineItemAppliedServiceCharge] }, optional: true, nullable: false
|
|
35
27
|
field :total_service_charge_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
36
28
|
end
|
|
37
29
|
end
|
|
@@ -14,15 +14,12 @@ module Square
|
|
|
14
14
|
field :applied_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
15
15
|
field :total_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
16
16
|
field :total_tax_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
17
|
-
field :calculation_phase,
|
|
18
|
-
Square::Types::OrderServiceChargeCalculationPhase
|
|
19
|
-
}, optional: true, nullable: false
|
|
17
|
+
field :calculation_phase, -> { Square::Types::OrderServiceChargeCalculationPhase }, optional: true, nullable: false
|
|
20
18
|
field :taxable, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
21
|
-
field :applied_taxes,
|
|
22
|
-
Internal::Types::Array[Square::Types::OrderLineItemAppliedTax]
|
|
23
|
-
}, optional: true, nullable: false
|
|
19
|
+
field :applied_taxes, -> { Internal::Types::Array[Square::Types::OrderLineItemAppliedTax] }, optional: true, nullable: false
|
|
24
20
|
field :treatment_type, -> { Square::Types::OrderServiceChargeTreatmentType }, optional: true, nullable: false
|
|
25
21
|
field :scope, -> { Square::Types::OrderServiceChargeScope }, optional: true, nullable: false
|
|
22
|
+
field :type, -> { Square::Types::OrderServiceChargeType }, optional: true, nullable: false
|
|
26
23
|
end
|
|
27
24
|
end
|
|
28
25
|
end
|
|
@@ -13,13 +13,9 @@ module Square
|
|
|
13
13
|
field :applied_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
14
14
|
field :total_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
15
15
|
field :total_tax_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
16
|
-
field :calculation_phase,
|
|
17
|
-
Square::Types::OrderServiceChargeCalculationPhase
|
|
18
|
-
}, optional: true, nullable: false
|
|
16
|
+
field :calculation_phase, -> { Square::Types::OrderServiceChargeCalculationPhase }, optional: true, nullable: false
|
|
19
17
|
field :taxable, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
20
|
-
field :applied_taxes,
|
|
21
|
-
Internal::Types::Array[Square::Types::OrderLineItemAppliedTax]
|
|
22
|
-
}, optional: true, nullable: false
|
|
18
|
+
field :applied_taxes, -> { Internal::Types::Array[Square::Types::OrderLineItemAppliedTax] }, optional: true, nullable: false
|
|
23
19
|
field :metadata, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
24
20
|
field :type, -> { Square::Types::OrderServiceChargeType }, optional: true, nullable: false
|
|
25
21
|
field :treatment_type, -> { Square::Types::OrderServiceChargeTreatmentType }, optional: true, nullable: false
|
data/lib/square/types/payment.rb
CHANGED
|
@@ -12,9 +12,7 @@ module Square
|
|
|
12
12
|
field :total_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
13
13
|
field :app_fee_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
14
14
|
field :approved_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
15
|
-
field :processing_fee,
|
|
16
|
-
Internal::Types::Array[Square::Types::ProcessingFee]
|
|
17
|
-
}, optional: true, nullable: false
|
|
15
|
+
field :processing_fee, -> { Internal::Types::Array[Square::Types::ProcessingFee] }, optional: true, nullable: false
|
|
18
16
|
field :refunded_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
19
17
|
field :status, -> { String }, optional: true, nullable: false
|
|
20
18
|
field :delay_duration, -> { String }, optional: true, nullable: false
|
|
@@ -4,9 +4,7 @@ module Square
|
|
|
4
4
|
module Types
|
|
5
5
|
class PaymentLinkRelatedResources < Internal::Types::Model
|
|
6
6
|
field :orders, -> { Internal::Types::Array[Square::Types::Order] }, optional: true, nullable: false
|
|
7
|
-
field :subscription_plans,
|
|
8
|
-
Internal::Types::Array[Square::Types::CatalogObject]
|
|
9
|
-
}, optional: true, nullable: false
|
|
7
|
+
field :subscription_plans, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
|
|
10
8
|
end
|
|
11
9
|
end
|
|
12
10
|
end
|
|
@@ -13,9 +13,7 @@ module Square
|
|
|
13
13
|
field :destination_details, -> { Square::Types::DestinationDetails }, optional: true, nullable: false
|
|
14
14
|
field :amount_money, -> { Square::Types::Money }, optional: false, nullable: false
|
|
15
15
|
field :app_fee_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
16
|
-
field :processing_fee,
|
|
17
|
-
Internal::Types::Array[Square::Types::ProcessingFee]
|
|
18
|
-
}, optional: true, nullable: false
|
|
16
|
+
field :processing_fee, -> { Internal::Types::Array[Square::Types::ProcessingFee] }, optional: true, nullable: false
|
|
19
17
|
field :payment_id, -> { String }, optional: true, nullable: false
|
|
20
18
|
field :order_id, -> { String }, optional: true, nullable: false
|
|
21
19
|
field :reason, -> { String }, optional: true, nullable: false
|
|
@@ -12,79 +12,31 @@ module Square
|
|
|
12
12
|
field :gross_amount_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
13
13
|
field :fee_amount_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
14
14
|
field :net_amount_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
15
|
-
field :type_app_fee_revenue_details,
|
|
16
|
-
|
|
17
|
-
}, optional: true, nullable: false
|
|
18
|
-
field :
|
|
19
|
-
|
|
20
|
-
}, optional: true, nullable: false
|
|
21
|
-
field :
|
|
22
|
-
|
|
23
|
-
}, optional: true, nullable: false
|
|
24
|
-
field :type_automatic_savings_reversed_details, lambda {
|
|
25
|
-
Square::Types::PaymentBalanceActivityAutomaticSavingsReversedDetail
|
|
26
|
-
}, optional: true, nullable: false
|
|
27
|
-
field :type_charge_details, lambda {
|
|
28
|
-
Square::Types::PaymentBalanceActivityChargeDetail
|
|
29
|
-
}, optional: true, nullable: false
|
|
30
|
-
field :type_deposit_fee_details, lambda {
|
|
31
|
-
Square::Types::PaymentBalanceActivityDepositFeeDetail
|
|
32
|
-
}, optional: true, nullable: false
|
|
33
|
-
field :type_deposit_fee_reversed_details, lambda {
|
|
34
|
-
Square::Types::PaymentBalanceActivityDepositFeeReversedDetail
|
|
35
|
-
}, optional: true, nullable: false
|
|
36
|
-
field :type_dispute_details, lambda {
|
|
37
|
-
Square::Types::PaymentBalanceActivityDisputeDetail
|
|
38
|
-
}, optional: true, nullable: false
|
|
15
|
+
field :type_app_fee_revenue_details, -> { Square::Types::PaymentBalanceActivityAppFeeRevenueDetail }, optional: true, nullable: false
|
|
16
|
+
field :type_app_fee_refund_details, -> { Square::Types::PaymentBalanceActivityAppFeeRefundDetail }, optional: true, nullable: false
|
|
17
|
+
field :type_automatic_savings_details, -> { Square::Types::PaymentBalanceActivityAutomaticSavingsDetail }, optional: true, nullable: false
|
|
18
|
+
field :type_automatic_savings_reversed_details, -> { Square::Types::PaymentBalanceActivityAutomaticSavingsReversedDetail }, optional: true, nullable: false
|
|
19
|
+
field :type_charge_details, -> { Square::Types::PaymentBalanceActivityChargeDetail }, optional: true, nullable: false
|
|
20
|
+
field :type_deposit_fee_details, -> { Square::Types::PaymentBalanceActivityDepositFeeDetail }, optional: true, nullable: false
|
|
21
|
+
field :type_deposit_fee_reversed_details, -> { Square::Types::PaymentBalanceActivityDepositFeeReversedDetail }, optional: true, nullable: false
|
|
22
|
+
field :type_dispute_details, -> { Square::Types::PaymentBalanceActivityDisputeDetail }, optional: true, nullable: false
|
|
39
23
|
field :type_fee_details, -> { Square::Types::PaymentBalanceActivityFeeDetail }, optional: true, nullable: false
|
|
40
|
-
field :type_free_processing_details,
|
|
41
|
-
|
|
42
|
-
}, optional: true, nullable: false
|
|
43
|
-
field :
|
|
44
|
-
|
|
45
|
-
}, optional: true, nullable: false
|
|
46
|
-
field :
|
|
47
|
-
|
|
48
|
-
}, optional: true, nullable: false
|
|
49
|
-
field :
|
|
50
|
-
|
|
51
|
-
}, optional: true, nullable: false
|
|
52
|
-
field :
|
|
53
|
-
|
|
54
|
-
}, optional: true, nullable: false
|
|
55
|
-
field :
|
|
56
|
-
Square::Types::PaymentBalanceActivityRefundDetail
|
|
57
|
-
}, optional: true, nullable: false
|
|
58
|
-
field :type_release_adjustment_details, lambda {
|
|
59
|
-
Square::Types::PaymentBalanceActivityReleaseAdjustmentDetail
|
|
60
|
-
}, optional: true, nullable: false
|
|
61
|
-
field :type_reserve_hold_details, lambda {
|
|
62
|
-
Square::Types::PaymentBalanceActivityReserveHoldDetail
|
|
63
|
-
}, optional: true, nullable: false
|
|
64
|
-
field :type_reserve_release_details, lambda {
|
|
65
|
-
Square::Types::PaymentBalanceActivityReserveReleaseDetail
|
|
66
|
-
}, optional: true, nullable: false
|
|
67
|
-
field :type_square_capital_payment_details, lambda {
|
|
68
|
-
Square::Types::PaymentBalanceActivitySquareCapitalPaymentDetail
|
|
69
|
-
}, optional: true, nullable: false
|
|
70
|
-
field :type_square_capital_reversed_payment_details, lambda {
|
|
71
|
-
Square::Types::PaymentBalanceActivitySquareCapitalReversedPaymentDetail
|
|
72
|
-
}, optional: true, nullable: false
|
|
73
|
-
field :type_tax_on_fee_details, lambda {
|
|
74
|
-
Square::Types::PaymentBalanceActivityTaxOnFeeDetail
|
|
75
|
-
}, optional: true, nullable: false
|
|
76
|
-
field :type_third_party_fee_details, lambda {
|
|
77
|
-
Square::Types::PaymentBalanceActivityThirdPartyFeeDetail
|
|
78
|
-
}, optional: true, nullable: false
|
|
79
|
-
field :type_third_party_fee_refund_details, lambda {
|
|
80
|
-
Square::Types::PaymentBalanceActivityThirdPartyFeeRefundDetail
|
|
81
|
-
}, optional: true, nullable: false
|
|
82
|
-
field :type_square_payroll_transfer_details, lambda {
|
|
83
|
-
Square::Types::PaymentBalanceActivitySquarePayrollTransferDetail
|
|
84
|
-
}, optional: true, nullable: false
|
|
85
|
-
field :type_square_payroll_transfer_reversed_details, lambda {
|
|
86
|
-
Square::Types::PaymentBalanceActivitySquarePayrollTransferReversedDetail
|
|
87
|
-
}, optional: true, nullable: false
|
|
24
|
+
field :type_free_processing_details, -> { Square::Types::PaymentBalanceActivityFreeProcessingDetail }, optional: true, nullable: false
|
|
25
|
+
field :type_hold_adjustment_details, -> { Square::Types::PaymentBalanceActivityHoldAdjustmentDetail }, optional: true, nullable: false
|
|
26
|
+
field :type_open_dispute_details, -> { Square::Types::PaymentBalanceActivityOpenDisputeDetail }, optional: true, nullable: false
|
|
27
|
+
field :type_other_details, -> { Square::Types::PaymentBalanceActivityOtherDetail }, optional: true, nullable: false
|
|
28
|
+
field :type_other_adjustment_details, -> { Square::Types::PaymentBalanceActivityOtherAdjustmentDetail }, optional: true, nullable: false
|
|
29
|
+
field :type_refund_details, -> { Square::Types::PaymentBalanceActivityRefundDetail }, optional: true, nullable: false
|
|
30
|
+
field :type_release_adjustment_details, -> { Square::Types::PaymentBalanceActivityReleaseAdjustmentDetail }, optional: true, nullable: false
|
|
31
|
+
field :type_reserve_hold_details, -> { Square::Types::PaymentBalanceActivityReserveHoldDetail }, optional: true, nullable: false
|
|
32
|
+
field :type_reserve_release_details, -> { Square::Types::PaymentBalanceActivityReserveReleaseDetail }, optional: true, nullable: false
|
|
33
|
+
field :type_square_capital_payment_details, -> { Square::Types::PaymentBalanceActivitySquareCapitalPaymentDetail }, optional: true, nullable: false
|
|
34
|
+
field :type_square_capital_reversed_payment_details, -> { Square::Types::PaymentBalanceActivitySquareCapitalReversedPaymentDetail }, optional: true, nullable: false
|
|
35
|
+
field :type_tax_on_fee_details, -> { Square::Types::PaymentBalanceActivityTaxOnFeeDetail }, optional: true, nullable: false
|
|
36
|
+
field :type_third_party_fee_details, -> { Square::Types::PaymentBalanceActivityThirdPartyFeeDetail }, optional: true, nullable: false
|
|
37
|
+
field :type_third_party_fee_refund_details, -> { Square::Types::PaymentBalanceActivityThirdPartyFeeRefundDetail }, optional: true, nullable: false
|
|
38
|
+
field :type_square_payroll_transfer_details, -> { Square::Types::PaymentBalanceActivitySquarePayrollTransferDetail }, optional: true, nullable: false
|
|
39
|
+
field :type_square_payroll_transfer_reversed_details, -> { Square::Types::PaymentBalanceActivitySquarePayrollTransferReversedDetail }, optional: true, nullable: false
|
|
88
40
|
end
|
|
89
41
|
end
|
|
90
42
|
end
|
|
@@ -4,7 +4,8 @@ module Square
|
|
|
4
4
|
module Types
|
|
5
5
|
# Describes buyer data to prepopulate in the payment form.
|
|
6
6
|
# For more information,
|
|
7
|
-
# see [Optional Checkout
|
|
7
|
+
# see [Optional Checkout
|
|
8
|
+
# Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations).
|
|
8
9
|
class PrePopulatedData < Internal::Types::Model
|
|
9
10
|
field :buyer_email, -> { String }, optional: true, nullable: false
|
|
10
11
|
field :buyer_phone_number, -> { String }, optional: true, nullable: false
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
module ProductType
|
|
6
|
+
# ProductType 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
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
# Response for receiving items for a transfer order
|
|
6
|
+
class ReceiveTransferOrderResponse < 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
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
class Reference < Internal::Types::Model
|
|
6
|
+
field :type, -> { Square::Types::ReferenceType }, optional: true, nullable: false
|
|
7
|
+
field :id, -> { String }, optional: true, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
module ReferenceType
|
|
6
|
+
extend Square::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE"
|
|
9
|
+
LOCATION = "LOCATION"
|
|
10
|
+
FIRST_PARTY_INTEGRATION = "FIRST_PARTY_INTEGRATION"
|
|
11
|
+
OAUTH_APPLICATION = "OAUTH_APPLICATION"
|
|
12
|
+
ONLINE_SITE = "ONLINE_SITE"
|
|
13
|
+
ONLINE_CHECKOUT = "ONLINE_CHECKOUT"
|
|
14
|
+
INVOICE = "INVOICE"
|
|
15
|
+
GIFT_CARD = "GIFT_CARD"
|
|
16
|
+
GIFT_CARD_MARKETPLACE = "GIFT_CARD_MARKETPLACE"
|
|
17
|
+
RECURRING_SUBSCRIPTION = "RECURRING_SUBSCRIPTION"
|
|
18
|
+
ONLINE_BOOKING_FLOW = "ONLINE_BOOKING_FLOW"
|
|
19
|
+
SQUARE_ASSISTANT = "SQUARE_ASSISTANT"
|
|
20
|
+
CASH_LOCAL = "CASH_LOCAL"
|
|
21
|
+
POINT_OF_SALE = "POINT_OF_SALE"
|
|
22
|
+
KIOSK = "KIOSK"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
data/lib/square/types/refund.rb
CHANGED
|
@@ -13,9 +13,7 @@ module Square
|
|
|
13
13
|
field :amount_money, -> { Square::Types::Money }, optional: false, nullable: false
|
|
14
14
|
field :status, -> { Square::Types::RefundStatus }, optional: false, nullable: false
|
|
15
15
|
field :processing_fee_money, -> { Square::Types::Money }, optional: true, nullable: false
|
|
16
|
-
field :additional_recipients,
|
|
17
|
-
Internal::Types::Array[Square::Types::AdditionalRecipient]
|
|
18
|
-
}, optional: true, nullable: false
|
|
16
|
+
field :additional_recipients, -> { Internal::Types::Array[Square::Types::AdditionalRecipient] }, optional: true, nullable: false
|
|
19
17
|
end
|
|
20
18
|
end
|
|
21
19
|
end
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Represents a
|
|
5
|
+
# Represents a
|
|
6
|
+
# [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition)
|
|
7
|
+
# response.
|
|
6
8
|
# Either `custom_attribute_definition` or `errors` is present in the response.
|
|
7
9
|
class RetrieveBookingCustomAttributeDefinitionResponse < Internal::Types::Model
|
|
8
|
-
field :custom_attribute_definition,
|
|
9
|
-
Square::Types::CustomAttributeDefinition
|
|
10
|
-
}, optional: true, nullable: false
|
|
10
|
+
field :custom_attribute_definition, -> { Square::Types::CustomAttributeDefinition }, optional: true, nullable: false
|
|
11
11
|
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Represents a [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute)
|
|
5
|
+
# Represents a [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute)
|
|
6
|
+
# response.
|
|
6
7
|
# Either `custom_attribute_definition` or `errors` is present in the response.
|
|
7
8
|
class RetrieveBookingCustomAttributeResponse < Internal::Types::Model
|
|
8
9
|
field :custom_attribute, -> { Square::Types::CustomAttribute }, optional: true, nullable: false
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Square
|
|
4
|
+
module Types
|
|
5
|
+
class RetrieveChannelResponse < Internal::Types::Model
|
|
6
|
+
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
7
|
+
field :channel, -> { Square::Types::Channel }, optional: true, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Represents a
|
|
5
|
+
# Represents a
|
|
6
|
+
# [RetrieveLocationCustomAttributeDefinition](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttributeDefinition)
|
|
7
|
+
# response.
|
|
6
8
|
# Either `custom_attribute_definition` or `errors` is present in the response.
|
|
7
9
|
class RetrieveLocationCustomAttributeDefinitionResponse < Internal::Types::Model
|
|
8
|
-
field :custom_attribute_definition,
|
|
9
|
-
Square::Types::CustomAttributeDefinition
|
|
10
|
-
}, optional: true, nullable: false
|
|
10
|
+
field :custom_attribute_definition, -> { Square::Types::CustomAttributeDefinition }, optional: true, nullable: false
|
|
11
11
|
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Square
|
|
4
4
|
module Types
|
|
5
|
-
# Represents a
|
|
5
|
+
# Represents a
|
|
6
|
+
# [RetrieveLocationCustomAttribute](api-endpoint:LocationCustomAttributes-RetrieveLocationCustomAttribute) response.
|
|
6
7
|
# Either `custom_attribute_definition` or `errors` is present in the response.
|
|
7
8
|
class RetrieveLocationCustomAttributeResponse < Internal::Types::Model
|
|
8
9
|
field :custom_attribute, -> { Square::Types::CustomAttribute }, optional: true, nullable: false
|