Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"generatorConfig": {
"enableWireTests": true
},
"originGitCommit": "074e2540401528521d322c512800c4ebd67cd153",
"originGitCommit": "b05364cda2b85e35d8daa9ff2c24bbabbbd9652a",
"sdkVersion": "46.1.0.20260819"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions lib/square.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
require_relative "square/types/catalog_modifier_list"
require_relative "square/types/catalog_item_option"
require_relative "square/types/catalog_item"
require_relative "square/types/included_resources"
require_relative "square/types/batch_get_catalog_objects_response"
require_relative "square/types/batch_retrieve_inventory_changes_sort_field"
require_relative "square/types/sort_order"
Expand Down Expand Up @@ -516,6 +517,7 @@
require_relative "square/types/catalog_query_items_for_item_options"
require_relative "square/types/catalog_query_items_for_modifier_list"
require_relative "square/types/catalog_query_items_for_tax"
require_relative "square/types/catalog_query_modifiers_for_child_list"
require_relative "square/types/catalog_query_prefix"
require_relative "square/types/catalog_query_range"
require_relative "square/types/catalog_query_set"
Expand Down Expand Up @@ -830,6 +832,8 @@
require_relative "square/types/gift_card_updated_event_object"
require_relative "square/types/gift_card_updated_event_data"
require_relative "square/types/gift_card_updated_event"
require_relative "square/types/include_type"
require_relative "square/types/include_options"
require_relative "square/types/inventory_count_updated_event_object"
require_relative "square/types/inventory_count_updated_event_data"
require_relative "square/types/inventory_count_updated_event"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class BatchGetCatalogObjectsRequest < Internal::Types::Model
field :catalog_version, -> { Integer }, optional: true, nullable: false
field :include_deleted_objects, -> { Internal::Types::Boolean }, optional: true, nullable: false
field :include_category_path_to_root, -> { Internal::Types::Boolean }, optional: true, nullable: false
field :include_options, -> { Square::Types::IncludeOptions }, optional: true, nullable: false
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/square/catalog/types/search_catalog_items_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class SearchCatalogItemsRequest < Internal::Types::Model
field :product_types, -> { Internal::Types::Array[Square::Types::CatalogItemProductType] }, optional: true, nullable: false
field :custom_attribute_filters, -> { Internal::Types::Array[Square::Types::CustomAttributeFilter] }, optional: true, nullable: false
field :archived_state, -> { Square::Types::ArchivedState }, optional: true, nullable: false
field :include_options, -> { Square::Types::IncludeOptions }, optional: true, nullable: false
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/square/catalog/types/search_catalog_objects_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SearchCatalogObjectsRequest < Internal::Types::Model
field :query, -> { Square::Types::CatalogQuery }, optional: true, nullable: false
field :limit, -> { Integer }, optional: true, nullable: false
field :include_category_path_to_root, -> { Internal::Types::Boolean }, optional: true, nullable: false
field :include_options, -> { Square::Types::IncludeOptions }, optional: true, nullable: false
end
end
end
Expand Down
5 changes: 3 additions & 2 deletions lib/square/orders/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ def clone(request_options: {}, **params)
#
# Note that details for orders processed with Square Point of Sale while in
# offline mode might not be transmitted to Square for up to 72 hours. Offline
# orders have a `created_at` value that reflects the time the order was created,
# not the time it was subsequently transmitted to Square.
# orders have a `created_at` value that reflects the time the order was
# transmitted to Square and created server-side, not the time the order was
# created on the Point of Sale device.
#
# @param request_options [Hash]
# @param params [Square::Orders::Types::SearchOrdersRequest]
Expand Down
1 change: 1 addition & 0 deletions lib/square/types/batch_get_catalog_objects_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class BatchGetCatalogObjectsResponse < Internal::Types::Model
field :errors, -> { Internal::Types::Array[Square::Types::Error] }, optional: true, nullable: false
field :objects, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
field :related_objects, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
field :included_resources, -> { Square::Types::IncludedResources }, optional: true, nullable: false
end
end
end
4 changes: 4 additions & 0 deletions lib/square/types/card_brand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ module CardBrand
EFTPOS = "EFTPOS"
FELICA = "FELICA"
EBT = "EBT"
QUICPAY = "QUICPAY"
ID = "ID"
TRANSPORTATION_IC = "TRANSPORTATION_IC"
CARNET = "CARNET"
end
end
end
1 change: 1 addition & 0 deletions lib/square/types/catalog_modifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CatalogModifier < Internal::Types::Model
field :kitchen_name, -> { String }, optional: true, nullable: false
field :image_id, -> { String }, optional: true, nullable: false
field :hidden_online, -> { Internal::Types::Boolean }, optional: true, nullable: false
field :child_modifier_list_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
end
end
end
1 change: 1 addition & 0 deletions lib/square/types/catalog_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class CatalogQuery < Internal::Types::Model
field :items_for_modifier_list_query, -> { Square::Types::CatalogQueryItemsForModifierList }, optional: true, nullable: false
field :items_for_item_options_query, -> { Square::Types::CatalogQueryItemsForItemOptions }, optional: true, nullable: false
field :item_variations_for_item_option_values_query, -> { Square::Types::CatalogQueryItemVariationsForItemOptionValues }, optional: true, nullable: false
field :modifiers_for_child_list_query, -> { Square::Types::CatalogQueryModifiersForChildList }, optional: true, nullable: false
end
end
end
11 changes: 11 additions & 0 deletions lib/square/types/catalog_query_modifiers_for_child_list.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Square
module Types
# Query to find `CatalogModifier` objects that reference a given `CatalogModifierList` in their
# `child_modifier_list_ids` field.
class CatalogQueryModifiersForChildList < Internal::Types::Model
field :child_modifier_list_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
end
end
end
9 changes: 9 additions & 0 deletions lib/square/types/error_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ module ErrorCode
CARD_TOKEN_EXPIRED = "CARD_TOKEN_EXPIRED"
CARD_TOKEN_USED = "CARD_TOKEN_USED"
AMOUNT_TOO_HIGH = "AMOUNT_TOO_HIGH"
AMOUNT_TOO_LOW = "AMOUNT_TOO_LOW"
UNSUPPORTED_INSTRUMENT_TYPE = "UNSUPPORTED_INSTRUMENT_TYPE"
REFUND_AMOUNT_INVALID = "REFUND_AMOUNT_INVALID"
REFUND_ALREADY_PENDING = "REFUND_ALREADY_PENDING"
Expand Down Expand Up @@ -133,6 +134,13 @@ module ErrorCode
PLAID_ERROR = "PLAID_ERROR"
PLAID_ERROR_ITEM_LOGIN_REQUIRED = "PLAID_ERROR_ITEM_LOGIN_REQUIRED"
PLAID_ERROR_RATE_LIMIT = "PLAID_ERROR_RATE_LIMIT"
PLAID_ERROR_INVALID_ACCESS_TOKEN = "PLAID_ERROR_INVALID_ACCESS_TOKEN"
PLAID_ERROR_INVALID_ACCOUNT_ID = "PLAID_ERROR_INVALID_ACCOUNT_ID"
PLAID_ERROR_NO_ACCOUNTS = "PLAID_ERROR_NO_ACCOUNTS"
PLAID_ERROR_ITEM_NOT_FOUND = "PLAID_ERROR_ITEM_NOT_FOUND"
PLAID_ERROR_INSUFFICIENT_CREDENTIALS = "PLAID_ERROR_INSUFFICIENT_CREDENTIALS"
PLAID_ERROR_ITEM_NOT_SUPPORTED = "PLAID_ERROR_ITEM_NOT_SUPPORTED"
PLAID_ERROR_PRODUCT_NOT_READY = "PLAID_ERROR_PRODUCT_NOT_READY"
PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET = "PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET"
CARD_DECLINED = "CARD_DECLINED"
VERIFY_CVV_FAILURE = "VERIFY_CVV_FAILURE"
Expand All @@ -144,6 +152,7 @@ module ErrorCode
ALLOWABLE_PIN_TRIES_EXCEEDED = "ALLOWABLE_PIN_TRIES_EXCEEDED"
RESERVATION_DECLINED = "RESERVATION_DECLINED"
UNKNOWN_BODY_PARAMETER = "UNKNOWN_BODY_PARAMETER"
CART_INELIGIBLE_FOR_EBT = "CART_INELIGIBLE_FOR_EBT"
NOT_FOUND = "NOT_FOUND"
APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND = "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND"
METHOD_NOT_ALLOWED = "METHOD_NOT_ALLOWED"
Expand Down
11 changes: 11 additions & 0 deletions lib/square/types/include_options.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Square
module Types
# Options to include related resources of the requested `CatalogObject`s. Related resources will be included in
# `IncludedResources` in the response.
class IncludeOptions < Internal::Types::Model
field :include, -> { Internal::Types::Array[Square::Types::IncludeType] }, optional: true, nullable: false
end
end
end
12 changes: 12 additions & 0 deletions lib/square/types/include_type.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

module Square
module Types
module IncludeType
extend Square::Internal::Types::Enum

INCLUDE_NESTED_MODIFIERS = "INCLUDE_NESTED_MODIFIERS"
INCLUDE_ANCESTOR_MODIFIERS = "INCLUDE_ANCESTOR_MODIFIERS"
end
end
end
11 changes: 11 additions & 0 deletions lib/square/types/included_resources.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Square
module Types
# Related resources of the response `CatalogObject`s requested using `IncludeOptions`
class IncludedResources < Internal::Types::Model
field :nested_modifiers, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
field :ancestor_modifiers, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
end
end
end
2 changes: 2 additions & 0 deletions lib/square/types/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Location < Internal::Types::Model
field :mcc, -> { String }, optional: true, nullable: false
field :full_format_logo_url, -> { String }, optional: true, nullable: false
field :tax_ids, -> { Square::Types::TaxIds }, optional: true, nullable: false
field :custom_receipt_text, -> { String }, optional: true, nullable: false
field :return_policy, -> { String }, optional: true, nullable: false
end
end
end
1 change: 1 addition & 0 deletions lib/square/types/search_catalog_items_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class SearchCatalogItemsResponse < Internal::Types::Model
field :items, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
field :cursor, -> { String }, optional: true, nullable: false
field :matched_variation_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
field :included_resources, -> { Square::Types::IncludedResources }, optional: true, nullable: false
end
end
end
1 change: 1 addition & 0 deletions lib/square/types/search_catalog_objects_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class SearchCatalogObjectsResponse < Internal::Types::Model
field :objects, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
field :related_objects, -> { Internal::Types::Array[Square::Types::CatalogObject] }, optional: true, nullable: false
field :latest_time, -> { String }, optional: true, nullable: false
field :included_resources, -> { Square::Types::IncludedResources }, optional: true, nullable: false
end
end
end
29 changes: 27 additions & 2 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,14 @@ in the response payload.
<dl>
<dd>

**include_options:** `Square::Types::IncludeOptions` — Options to include related resources in the response.

</dd>
</dl>

<dl>
<dd>

**request_options:** `Square::Catalog::RequestOptions`

</dd>
Expand Down Expand Up @@ -2978,6 +2986,14 @@ is higher than the maximum limit of 1,000, it will be ignored.
<dl>
<dd>

**include_options:** `Square::Types::IncludeOptions` — Options to include related resources in the response.

</dd>
</dl>

<dl>
<dd>

**request_options:** `Square::Catalog::RequestOptions`

</dd>
Expand Down Expand Up @@ -3158,6 +3174,14 @@ a single call to the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItem
<dl>
<dd>

**include_options:** `Square::Types::IncludeOptions` — Options to include related resources in the response.

</dd>
</dl>

<dl>
<dd>

**request_options:** `Square::Catalog::RequestOptions`

</dd>
Expand Down Expand Up @@ -11227,8 +11251,9 @@ how to sort or filter the results. Your `SearchOrdersQuery` can:

Note that details for orders processed with Square Point of Sale while in
offline mode might not be transmitted to Square for up to 72 hours. Offline
orders have a `created_at` value that reflects the time the order was created,
not the time it was subsequently transmitted to Square.
orders have a `created_at` value that reflects the time the order was
transmitted to Square and created server-side, not the time the order was
created on the Point of Sale device.
</dd>
</dl>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion wiremock/wiremock-mappings.json

Large diffs are not rendered by default.

Loading