inttegro 8.0.0 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/lib/inttegro/checkout/invoice_view.rb +8 -0
  4. data/lib/inttegro/checkout/order_line_item_group.rb +23 -0
  5. data/lib/inttegro/chime/send_request.rb +9 -0
  6. data/lib/inttegro/chime/send_request_cooldown.rb +35 -0
  7. data/lib/inttegro/chime/transport.rb +2 -1
  8. data/lib/inttegro/generated/enums.rb +12 -1
  9. data/lib/inttegro/generated/models.rb +26 -0
  10. data/lib/inttegro/generated/operations.rb +18 -3
  11. data/lib/inttegro/http_client.rb +1 -1
  12. data/lib/inttegro/order/create_existing_customer.rb +23 -0
  13. data/lib/inttegro/order/create_new_customer.rb +23 -0
  14. data/lib/inttegro/order/document_delivery_attempt.rb +7 -0
  15. data/lib/inttegro/order/document_delivery_channel_summary.rb +34 -0
  16. data/lib/inttegro/order/document_delivery_summary.rb +43 -0
  17. data/lib/inttegro/order/document_delivery_summary_channels.rb +36 -0
  18. data/lib/inttegro/order/invoice.rb +8 -0
  19. data/lib/inttegro/order/invoice_format.rb +3 -2
  20. data/lib/inttegro/order/line_item_group.rb +25 -0
  21. data/lib/inttegro/order/receipt_document_format.rb +35 -0
  22. data/lib/inttegro/order/update_request.rb +23 -0
  23. data/lib/inttegro/otp/initiate_request.rb +35 -8
  24. data/lib/inttegro/otp/purpose.rb +62 -0
  25. data/lib/inttegro/otp/transmission.rb +4 -4
  26. data/lib/inttegro/otp/transmission_status.rb +9 -0
  27. data/lib/inttegro/otp/verify_request.rb +2 -1
  28. data/lib/inttegro/refund/line_item.rb +31 -1
  29. data/lib/inttegro/refund/order_fee_line_item.rb +43 -0
  30. data/lib/inttegro/refund/order_fee_line_item_fee.rb +34 -0
  31. data/lib/inttegro/{otp/transmission_sent_via.rb → refund/order_fee_line_item_type.rb} +7 -6
  32. data/lib/inttegro/refund/order_line_item.rb +20 -0
  33. data/lib/inttegro/refund/order_product_line_item.rb +50 -0
  34. data/lib/inttegro/refund/order_product_line_item_product.rb +34 -0
  35. data/lib/inttegro/refund/order_product_line_item_type.rb +25 -0
  36. data/lib/inttegro/refund/order_shipping_line_item.rb +43 -0
  37. data/lib/inttegro/refund/order_shipping_line_item_shipping.rb +34 -0
  38. data/lib/inttegro/refund/order_shipping_line_item_type.rb +25 -0
  39. data/lib/inttegro/refund/payment_method_settlement.rb +18 -0
  40. data/lib/inttegro/refund/refund.rb +18 -0
  41. data/lib/inttegro/resources/customers.rb +8 -0
  42. data/lib/inttegro/resources/financial_accounts.rb +12 -0
  43. data/lib/inttegro/resources/orders.rb +8 -0
  44. data/lib/inttegro/resources/payouts.rb +8 -0
  45. data/lib/inttegro/resources/products.rb +8 -0
  46. data/lib/inttegro/search/base.rb +17 -0
  47. data/lib/inttegro/search/facet.rb +34 -0
  48. data/lib/inttegro/search/facet_bucket.rb +34 -0
  49. data/lib/inttegro/search/facet_result.rb +35 -0
  50. data/lib/inttegro/search/filter.rb +42 -0
  51. data/lib/inttegro/search/filter_operator.rb +27 -0
  52. data/lib/inttegro/search/freshness.rb +43 -0
  53. data/lib/inttegro/search/freshness_state.rb +36 -0
  54. data/lib/inttegro/search/page.rb +104 -0
  55. data/lib/inttegro/search/request.rb +68 -0
  56. data/lib/inttegro/search/resource_freshness.rb +50 -0
  57. data/lib/inttegro/search/resource_freshness_state.rb +37 -0
  58. data/lib/inttegro/search/resource_reference.rb +35 -0
  59. data/lib/inttegro/search/resource_total.rb +43 -0
  60. data/lib/inttegro/search/resource_total_relation.rb +28 -0
  61. data/lib/inttegro/search/response.rb +28 -0
  62. data/lib/inttegro/search/result.rb +78 -0
  63. data/lib/inttegro/search/sort.rb +36 -0
  64. data/lib/inttegro/search/sort_direction.rb +27 -0
  65. data/lib/inttegro/search/sort_field.rb +30 -0
  66. data/lib/inttegro/search/total.rb +35 -0
  67. data/lib/inttegro/search/total_relation.rb +27 -0
  68. data/lib/inttegro/search/type.rb +36 -0
  69. data/lib/inttegro/telemetry.rb +1 -1
  70. data/lib/inttegro/version.rb +1 -1
  71. data/rbi/inttegro/generated.rbi +15 -0
  72. metadata +41 -3
@@ -150,5 +150,23 @@ module Inttegro
150
150
  const :status, Inttegro::Refund::Status
151
151
  const :succeeded_at, T.nilable(Time), default: nil
152
152
  const :total, Inttegro::Money::Amount
153
+
154
+ extend T::Sig
155
+
156
+ sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) }
157
+ def self.from_hash(hash, strict = false)
158
+ data = hash.dup
159
+ if (settlement_value = data["settlement"]).is_a?(Hash)
160
+ data["settlement"] = case settlement_value["type"]
161
+ when "offline"
162
+ Inttegro::Refund::OfflineSettlement.from_hash(settlement_value)
163
+ when "payment_method"
164
+ Inttegro::Refund::PaymentMethodSettlement.from_hash(settlement_value)
165
+ else
166
+ settlement_value
167
+ end
168
+ end
169
+ super(data, strict)
170
+ end
153
171
  end
154
172
  end
@@ -43,6 +43,14 @@ module Inttegro
43
43
  def page(payload = {})
44
44
  @http.post_resource("/customers/page", Inttegro::Customer::Page, :page, payload || {})
45
45
  end
46
+
47
+ # Search customer profiles using indexed fields and full-text matching.
48
+ #
49
+ # @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
50
+ # @return [Inttegro::Search::Page] typed search results
51
+ def search(payload)
52
+ @http.post_resource("/customers/search", Inttegro::Search::Page, :search, payload)
53
+ end
46
54
  end
47
55
  end
48
56
  end
@@ -60,6 +60,18 @@ module Inttegro
60
60
  )
61
61
  end
62
62
 
63
+ # Search financial accounts using indexed fields and full-text matching.
64
+ #
65
+ # @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
66
+ # @return [Inttegro::Search::Page] typed search results
67
+ def search(payload)
68
+ @http.post_resource(
69
+ "/financial_accounts/search",
70
+ Inttegro::Search::Page, :search,
71
+ payload
72
+ )
73
+ end
74
+
63
75
  # Update mutable account profile fields.
64
76
  #
65
77
  # @param payload [Hash, Inttegro::FinancialAccount::UpdateRequest] account identifier and fields to change
@@ -398,6 +398,14 @@ module Inttegro
398
398
  @http.post_resource("/orders/page", Inttegro::Order::Page, :page, payload || {})
399
399
  end
400
400
 
401
+ # Search orders using indexed fields and full-text matching.
402
+ #
403
+ # @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
404
+ # @return [Inttegro::Search::Page] typed search results
405
+ def search(payload)
406
+ @http.post_resource("/orders/search", Inttegro::Search::Page, :search, payload)
407
+ end
408
+
401
409
  private
402
410
 
403
411
  def stable_order_request_meta(action, order_id)
@@ -156,6 +156,14 @@ module Inttegro
156
156
  @http.post_resource("/payouts/page", Inttegro::Payout::Page, :page, payload)
157
157
  end
158
158
 
159
+ # Search payouts using indexed fields and full-text matching.
160
+ #
161
+ # @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
162
+ # @return [Inttegro::Search::Page] typed search results
163
+ def search(payload)
164
+ @http.post_resource("/payouts/search", Inttegro::Search::Page, :search, payload)
165
+ end
166
+
159
167
  # Schedule a payout from the application's available balance.
160
168
  #
161
169
  # @param payload [Inttegro::Schedule::PayoutRequest] typed amount, destination, and execution fields
@@ -83,6 +83,14 @@ module Inttegro
83
83
  def page(payload = {})
84
84
  @http.post_resource("/products/page", Inttegro::Product::Page, :page, payload || {})
85
85
  end
86
+
87
+ # Search products using indexed fields and full-text matching.
88
+ #
89
+ # @param payload [Inttegro::Search::Request] search query, filters, sorting, facets, and cursor
90
+ # @return [Inttegro::Search::Page] typed search results
91
+ def search(payload)
92
+ @http.post_resource("/products/search", Inttegro::Search::Page, :search, payload)
93
+ end
86
94
  end
87
95
  end
88
96
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require "sorbet-runtime"
7
+
8
+ module Inttegro
9
+ # Namespace for generated search models and enums.
10
+ #
11
+ # Each public type in this namespace is defined in its own file and follows the field names
12
+ # and wire values declared by the Inttegro OpenAPI contract.
13
+ #
14
+ # @api public
15
+ module Search
16
+ end
17
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+
8
+ module Inttegro
9
+ module Search
10
+ # Typed representation of the facet object in the Inttegro API.
11
+ #
12
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
13
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
14
+ # field names and serialized enum values.
15
+ #
16
+ # @api public
17
+ #
18
+ # @!attribute [r] field
19
+ # Unqualified route-local field to group and count.
20
+ #
21
+ # Required in the API payload. Wire name: `field`.
22
+ # @return [String]
23
+ #
24
+ # @!attribute [r] limit
25
+ # Value of the `limit` field in the Inttegro API payload.
26
+ #
27
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `limit`.
28
+ # @return [Integer, nil]
29
+ class Facet < T::Struct
30
+ const :field, String
31
+ const :limit, T.nilable(Integer), default: nil
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+
8
+ module Inttegro
9
+ module Search
10
+ # Typed representation of the facet bucket object in the Inttegro API.
11
+ #
12
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
13
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
14
+ # field names and serialized enum values.
15
+ #
16
+ # @api public
17
+ #
18
+ # @!attribute [r] value
19
+ # Value of the `value` field in the Inttegro API payload.
20
+ #
21
+ # Required in the API payload. Wire name: `value`.
22
+ # @return [String]
23
+ #
24
+ # @!attribute [r] count
25
+ # Value of the `count` field in the Inttegro API payload.
26
+ #
27
+ # Required in the API payload. Wire name: `count`.
28
+ # @return [Integer]
29
+ class FacetBucket < T::Struct
30
+ const :value, String
31
+ const :count, Integer
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "facet_bucket"
8
+
9
+ module Inttegro
10
+ module Search
11
+ # Typed representation of the facet result object in the Inttegro API.
12
+ #
13
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
15
+ # field names and serialized enum values.
16
+ #
17
+ # @api public
18
+ #
19
+ # @!attribute [r] field
20
+ # The same unqualified route-local field requested by the caller.
21
+ #
22
+ # Required in the API payload. Wire name: `field`.
23
+ # @return [String]
24
+ #
25
+ # @!attribute [r] buckets
26
+ # Value of the `buckets` field in the Inttegro API payload.
27
+ #
28
+ # Required in the API payload. Wire name: `buckets`.
29
+ # @return [Array<Inttegro::Search::FacetBucket>]
30
+ class FacetResult < T::Struct
31
+ const :field, String
32
+ const :buckets, T::Array[Inttegro::Search::FacetBucket]
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "filter_operator"
8
+
9
+ module Inttegro
10
+ module Search
11
+ # Typed representation of the filter object in the Inttegro API.
12
+ #
13
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
15
+ # field names and serialized enum values.
16
+ #
17
+ # @api public
18
+ #
19
+ # @!attribute [r] field
20
+ # Unqualified route-local field name documented by the selected endpoint.
21
+ #
22
+ # Required in the API payload. Wire name: `field`.
23
+ # @return [String]
24
+ #
25
+ # @!attribute [r] operator
26
+ # `eq` requires exactly one value; `in` matches any supplied value.
27
+ #
28
+ # Required in the API payload. Wire name: `operator`.
29
+ # @return [Inttegro::Search::FilterOperator]
30
+ #
31
+ # @!attribute [r] values
32
+ # Value of the `values` field in the Inttegro API payload.
33
+ #
34
+ # Required in the API payload. Wire name: `values`.
35
+ # @return [Array<String>]
36
+ class Filter < T::Struct
37
+ const :field, String
38
+ const :operator, Inttegro::Search::FilterOperator
39
+ const :values, T::Array[String]
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+
8
+ module Inttegro
9
+ module Search
10
+ # `eq` requires exactly one value; `in` matches any supplied value.
11
+ #
12
+ # Use the constants below when constructing a request. `#serialize` returns the documented
13
+ # string wire value received from or sent to the API.
14
+ #
15
+ # @api public
16
+ class FilterOperator < T::Enum
17
+ enums do
18
+ # Serialized wire value: `eq`.
19
+ # @return [Inttegro::Search::FilterOperator]
20
+ EQ = new("eq")
21
+ # Serialized wire value: `in`.
22
+ # @return [Inttegro::Search::FilterOperator]
23
+ IN = new("in")
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "freshness_state"
8
+ require_relative "resource_freshness"
9
+
10
+ module Inttegro
11
+ module Search
12
+ # Typed representation of the freshness object in the Inttegro API.
13
+ #
14
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
15
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
16
+ # field names and serialized enum values.
17
+ #
18
+ # @api public
19
+ #
20
+ # @!attribute [r] state
21
+ # Value of the `state` field in the Inttegro API payload.
22
+ #
23
+ # Required in the API payload. Wire name: `state`.
24
+ # @return [Inttegro::Search::FreshnessState]
25
+ #
26
+ # @!attribute [r] observed_at
27
+ # Value of the `observed_at` field in the Inttegro API payload.
28
+ #
29
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `observed_at`.
30
+ # @return [Time, nil]
31
+ #
32
+ # @!attribute [r] resources
33
+ # Value of the `resources` field in the Inttegro API payload.
34
+ #
35
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `resources`.
36
+ # @return [Array<Inttegro::Search::ResourceFreshness>, nil]
37
+ class Freshness < T::Struct
38
+ const :state, Inttegro::Search::FreshnessState
39
+ const :observed_at, T.nilable(Time), default: nil
40
+ const :resources, T.nilable(T::Array[Inttegro::Search::ResourceFreshness]), default: nil
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+
8
+ module Inttegro
9
+ module Search
10
+ # String-backed values accepted by the Inttegro API for Inttegro::Search::FreshnessState.
11
+ #
12
+ # Use the constants below when constructing a request. `#serialize` returns the documented
13
+ # string wire value received from or sent to the API.
14
+ #
15
+ # @api public
16
+ class FreshnessState < T::Enum
17
+ enums do
18
+ # Serialized wire value: `current`.
19
+ # @return [Inttegro::Search::FreshnessState]
20
+ CURRENT = new("current")
21
+ # Serialized wire value: `delayed`.
22
+ # @return [Inttegro::Search::FreshnessState]
23
+ DELAYED = new("delayed")
24
+ # Serialized wire value: `partial`.
25
+ # @return [Inttegro::Search::FreshnessState]
26
+ PARTIAL = new("partial")
27
+ # Serialized wire value: `unknown`.
28
+ # @return [Inttegro::Search::FreshnessState]
29
+ UNKNOWN = new("unknown")
30
+ # Serialized wire value: `unavailable`.
31
+ # @return [Inttegro::Search::FreshnessState]
32
+ UNAVAILABLE = new("unavailable")
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "facet_result"
8
+ require_relative "freshness"
9
+ require_relative "resource_total"
10
+ require_relative "result"
11
+ require_relative "sort"
12
+ require_relative "total"
13
+ require_relative "type"
14
+
15
+ module Inttegro
16
+ module Search
17
+ # Typed representation of the page object in the Inttegro API.
18
+ #
19
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
20
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
21
+ # field names and serialized enum values.
22
+ #
23
+ # @api public
24
+ #
25
+ # @!attribute [r] resource_types
26
+ # Value of the `resource_types` field in the Inttegro API payload.
27
+ #
28
+ # Required in the API payload. Wire name: `resource_types`.
29
+ # @return [Array<Inttegro::Search::Type>]
30
+ #
31
+ # @!attribute [r] sort
32
+ # Value of the `sort` field in the Inttegro API payload.
33
+ #
34
+ # Required in the API payload. Wire name: `sort`.
35
+ # @return [Inttegro::Search::Sort]
36
+ #
37
+ # @!attribute [r] page_size
38
+ # Value of the `page_size` field in the Inttegro API payload.
39
+ #
40
+ # Required in the API payload. Wire name: `page_size`.
41
+ # @return [Integer]
42
+ #
43
+ # @!attribute [r] result_count
44
+ # Value of the `result_count` field in the Inttegro API payload.
45
+ #
46
+ # Required in the API payload. Wire name: `result_count`.
47
+ # @return [Integer]
48
+ #
49
+ # @!attribute [r] has_more
50
+ # Value of the `has_more` field in the Inttegro API payload.
51
+ #
52
+ # Required in the API payload. Wire name: `has_more`.
53
+ # @return [Boolean]
54
+ #
55
+ # @!attribute [r] total
56
+ # Value of the `total` field in the Inttegro API payload.
57
+ #
58
+ # Required in the API payload. Wire name: `total`.
59
+ # @return [Inttegro::Search::Total]
60
+ #
61
+ # @!attribute [r] resource_totals
62
+ # Value of the `resource_totals` field in the Inttegro API payload.
63
+ #
64
+ # Required in the API payload. Wire name: `resource_totals`.
65
+ # @return [Array<Inttegro::Search::ResourceTotal>]
66
+ #
67
+ # @!attribute [r] results
68
+ # Search projections for discovery, not canonical resource snapshots.
69
+ #
70
+ # Required in the API payload. Wire name: `results`.
71
+ # @return [Array<Inttegro::Search::Result>]
72
+ #
73
+ # @!attribute [r] facets
74
+ # Value of the `facets` field in the Inttegro API payload.
75
+ #
76
+ # Required in the API payload. Wire name: `facets`.
77
+ # @return [Array<Inttegro::Search::FacetResult>]
78
+ #
79
+ # @!attribute [r] next_cursor
80
+ # Value of the `next_cursor` field in the Inttegro API payload.
81
+ #
82
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `next_cursor`.
83
+ # @return [String, nil]
84
+ #
85
+ # @!attribute [r] freshness
86
+ # Value of the `freshness` field in the Inttegro API payload.
87
+ #
88
+ # Required in the API payload. Wire name: `freshness`.
89
+ # @return [Inttegro::Search::Freshness]
90
+ class Page < T::Struct
91
+ const :resource_types, T::Array[Inttegro::Search::Type]
92
+ const :sort, Inttegro::Search::Sort
93
+ const :page_size, Integer
94
+ const :result_count, Integer
95
+ const :has_more, T::Boolean
96
+ const :total, Inttegro::Search::Total
97
+ const :resource_totals, T::Array[Inttegro::Search::ResourceTotal]
98
+ const :results, T::Array[Inttegro::Search::Result]
99
+ const :facets, T::Array[Inttegro::Search::FacetResult]
100
+ const :next_cursor, T.nilable(String), default: nil
101
+ const :freshness, Inttegro::Search::Freshness
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "facet"
8
+ require_relative "filter"
9
+ require_relative "sort"
10
+
11
+ module Inttegro
12
+ module Search
13
+ # A resource-local search request. Send `text`, at least one filter, or both. Field names are
14
+ # unqualified and depend on the endpoint. The application and resource type are derived by
15
+ # Inttegro and cannot be supplied by the caller. To continue a search, repeat the same request
16
+ # and add the returned `next_cursor`.
17
+ #
18
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
19
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
20
+ # field names and serialized enum values.
21
+ #
22
+ # @api public
23
+ #
24
+ # @!attribute [r] text
25
+ # Words, identifiers, or names to search for.
26
+ #
27
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `text`.
28
+ # @return [String, nil]
29
+ #
30
+ # @!attribute [r] filters
31
+ # Value of the `filters` field in the Inttegro API payload.
32
+ #
33
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `filters`.
34
+ # @return [Array<Inttegro::Search::Filter>, nil]
35
+ #
36
+ # @!attribute [r] facets
37
+ # Value of the `facets` field in the Inttegro API payload.
38
+ #
39
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `facets`.
40
+ # @return [Array<Inttegro::Search::Facet>, nil]
41
+ #
42
+ # @!attribute [r] sort
43
+ # Value of the `sort` field in the Inttegro API payload.
44
+ #
45
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `sort`.
46
+ # @return [Inttegro::Search::Sort, nil]
47
+ #
48
+ # @!attribute [r] page_size
49
+ # Value of the `page_size` field in the Inttegro API payload.
50
+ #
51
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `page_size`.
52
+ # @return [Integer, nil]
53
+ #
54
+ # @!attribute [r] cursor
55
+ # Opaque continuation value returned as `next_cursor` by the preceding page.
56
+ #
57
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `cursor`.
58
+ # @return [String, nil]
59
+ class Request < T::Struct
60
+ const :text, T.nilable(String), default: nil
61
+ const :filters, T.nilable(T::Array[Inttegro::Search::Filter]), default: nil
62
+ const :facets, T.nilable(T::Array[Inttegro::Search::Facet]), default: nil
63
+ const :sort, T.nilable(Inttegro::Search::Sort), default: nil
64
+ const :page_size, T.nilable(Integer), default: nil
65
+ const :cursor, T.nilable(String), default: nil
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "resource_freshness_state"
8
+ require_relative "type"
9
+
10
+ module Inttegro
11
+ module Search
12
+ # Typed representation of the resource freshness object in the Inttegro API.
13
+ #
14
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
15
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
16
+ # field names and serialized enum values.
17
+ #
18
+ # @api public
19
+ #
20
+ # @!attribute [r] resource_type
21
+ # Value of the `resource_type` field in the Inttegro API payload.
22
+ #
23
+ # Required in the API payload. Wire name: `resource_type`.
24
+ # @return [Inttegro::Search::Type]
25
+ #
26
+ # @!attribute [r] state
27
+ # Value of the `state` field in the Inttegro API payload.
28
+ #
29
+ # Required in the API payload. Wire name: `state`.
30
+ # @return [Inttegro::Search::ResourceFreshnessState]
31
+ #
32
+ # @!attribute [r] observed_at
33
+ # Value of the `observed_at` field in the Inttegro API payload.
34
+ #
35
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `observed_at`.
36
+ # @return [Time, nil]
37
+ #
38
+ # @!attribute [r] last_indexed_at
39
+ # Value of the `last_indexed_at` field in the Inttegro API payload.
40
+ #
41
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `last_indexed_at`.
42
+ # @return [Time, nil]
43
+ class ResourceFreshness < T::Struct
44
+ const :resource_type, Inttegro::Search::Type
45
+ const :state, Inttegro::Search::ResourceFreshnessState
46
+ const :observed_at, T.nilable(Time), default: nil
47
+ const :last_indexed_at, T.nilable(Time), default: nil
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+
8
+ module Inttegro
9
+ module Search
10
+ # String-backed values accepted by the Inttegro API for
11
+ # Inttegro::Search::ResourceFreshnessState.
12
+ #
13
+ # Use the constants below when constructing a request. `#serialize` returns the documented
14
+ # string wire value received from or sent to the API.
15
+ #
16
+ # @api public
17
+ class ResourceFreshnessState < T::Enum
18
+ enums do
19
+ # Serialized wire value: `current`.
20
+ # @return [Inttegro::Search::ResourceFreshnessState]
21
+ CURRENT = new("current")
22
+ # Serialized wire value: `delayed`.
23
+ # @return [Inttegro::Search::ResourceFreshnessState]
24
+ DELAYED = new("delayed")
25
+ # Serialized wire value: `partial`.
26
+ # @return [Inttegro::Search::ResourceFreshnessState]
27
+ PARTIAL = new("partial")
28
+ # Serialized wire value: `unknown`.
29
+ # @return [Inttegro::Search::ResourceFreshnessState]
30
+ UNKNOWN = new("unknown")
31
+ # Serialized wire value: `unavailable`.
32
+ # @return [Inttegro::Search::ResourceFreshnessState]
33
+ UNAVAILABLE = new("unavailable")
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
+
6
+ require_relative "base"
7
+ require_relative "type"
8
+
9
+ module Inttegro
10
+ module Search
11
+ # Typed representation of the resource reference object in the Inttegro API.
12
+ #
13
+ # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
+ # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
15
+ # field names and serialized enum values.
16
+ #
17
+ # @api public
18
+ #
19
+ # @!attribute [r] type
20
+ # Value of the `type` field in the Inttegro API payload.
21
+ #
22
+ # Required in the API payload. Wire name: `type`.
23
+ # @return [Inttegro::Search::Type]
24
+ #
25
+ # @!attribute [r] id
26
+ # Value of the `id` field in the Inttegro API payload.
27
+ #
28
+ # Required in the API payload. Wire name: `id`.
29
+ # @return [String]
30
+ class ResourceReference < T::Struct
31
+ const :type, Inttegro::Search::Type
32
+ const :id, String
33
+ end
34
+ end
35
+ end