inttegro 6.0.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +2 -2
  4. data/SECURITY.md +1 -1
  5. data/lib/inttegro/api_response.rb +41 -0
  6. data/lib/inttegro/generated/enums.rb +0 -1
  7. data/lib/inttegro/generated/models.rb +12 -17
  8. data/lib/inttegro/generated/operations.rb +6 -6
  9. data/lib/inttegro/http_client.rb +65 -1
  10. data/lib/inttegro/payout/cancel_request.rb +2 -2
  11. data/lib/inttegro/payout/{lookup_response.rb → destinations.rb} +8 -8
  12. data/lib/inttegro/payout/disable_automatic_response.rb +1 -1
  13. data/lib/inttegro/payout/error.rb +5 -5
  14. data/lib/inttegro/payout/lookup_request.rb +2 -2
  15. data/lib/inttegro/payout/page.rb +3 -3
  16. data/lib/inttegro/payout/page_request.rb +3 -3
  17. data/lib/inttegro/payout/page_response.rb +2 -2
  18. data/lib/inttegro/payout/payout.rb +1 -1
  19. data/lib/inttegro/payout/{cancel_response.rb → response.rb} +2 -2
  20. data/lib/inttegro/payout/set_destinations_request.rb +5 -4
  21. data/lib/inttegro/payout/settings_lookup.rb +5 -4
  22. data/lib/inttegro/payout/{get_settings_response.rb → settings_lookup_response.rb} +2 -2
  23. data/lib/inttegro/payout/settings_lookup_schedule.rb +2 -2
  24. data/lib/inttegro/payout/settings_lookup_schedule_aging_spec.rb +4 -4
  25. data/lib/inttegro/payout/settings_mutation.rb +12 -4
  26. data/lib/inttegro/payout/{set_destinations_response.rb → settings_mutation_response.rb} +2 -2
  27. data/lib/inttegro/payout/settings_mutation_schedule.rb +2 -2
  28. data/lib/inttegro/payout/settings_mutation_schedule_spec.rb +1 -1
  29. data/lib/inttegro/purchase_intent/purchase_intent.rb +0 -8
  30. data/lib/inttegro/refund/cancel_request.rb +7 -0
  31. data/lib/inttegro/refund/refund.rb +14 -0
  32. data/lib/inttegro/resources/orders.rb +8 -0
  33. data/lib/inttegro/resources/payouts.rb +15 -32
  34. data/lib/inttegro/resources/refunds.rb +5 -2
  35. data/lib/inttegro/schedule/payout_request.rb +5 -5
  36. data/lib/inttegro/shared/response_meta.rb +35 -0
  37. data/lib/inttegro/version.rb +1 -1
  38. data/lib/inttegro.rb +1 -0
  39. data/rbi/inttegro/generated.rbi +11 -8
  40. metadata +11 -16
  41. data/lib/inttegro/payout/enable_automatic_response.rb +0 -28
  42. data/lib/inttegro/purchase_intent/activity.rb +0 -122
  43. data/lib/inttegro/purchase_intent/activity_attribution.rb +0 -83
  44. data/lib/inttegro/purchase_intent/activity_log.rb +0 -28
  45. data/lib/inttegro/purchase_intent/activity_type.rb +0 -37
  46. data/lib/inttegro/purchase_intent/activity_visitor.rb +0 -97
  47. data/lib/inttegro/schedule/payout_response.rb +0 -28
@@ -8,7 +8,7 @@ require_relative "settings_lookup_schedule_aging_spec"
8
8
 
9
9
  module Inttegro
10
10
  class Payout
11
- # Active payout schedule
11
+ # Active payout schedule returned when settings are retrieved.
12
12
  #
13
13
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
14
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -17,7 +17,7 @@ module Inttegro
17
17
  # @api public
18
18
  #
19
19
  # @!attribute [r] aging_spec
20
- # Value of the `aging_spec` field in the Inttegro API payload.
20
+ # Rules that determine when balance transactions become eligible for payout.
21
21
  #
22
22
  # Required in the API payload. Wire name: `aging_spec`.
23
23
  # @return [Inttegro::Payout::SettingsLookupScheduleAgingSpec]
@@ -7,7 +7,7 @@ require_relative "base"
7
7
 
8
8
  module Inttegro
9
9
  class Payout
10
- # Typed representation of the settings lookup schedule aging spec object in the Inttegro API.
10
+ # Rules that determine when balance transactions become eligible for payout.
11
11
  #
12
12
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
13
13
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -16,19 +16,19 @@ module Inttegro
16
16
  # @api public
17
17
  #
18
18
  # @!attribute [r] abide
19
- # Value of the `abide` field in the Inttegro API payload.
19
+ # How strictly the aging period is applied.
20
20
  #
21
21
  # Required in the API payload. Wire name: `abide`.
22
22
  # @return [String]
23
23
  #
24
24
  # @!attribute [r] label
25
- # Value of the `label` field in the Inttegro API payload.
25
+ # Human-readable aging rule label.
26
26
  #
27
27
  # Required in the API payload. Wire name: `label`.
28
28
  # @return [String]
29
29
  #
30
30
  # @!attribute [r] t_plus
31
- # Value of the `t_plus` field in the Inttegro API payload.
31
+ # Required transaction age.
32
32
  #
33
33
  # Required in the API payload. Wire name: `t_plus`.
34
34
  # @return [String]
@@ -4,6 +4,7 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "base"
7
+ require_relative "destinations"
7
8
  require_relative "settings_mutation_schedule"
8
9
 
9
10
  module Inttegro
@@ -17,10 +18,16 @@ module Inttegro
17
18
  # @api public
18
19
  #
19
20
  # @!attribute [r] destinations
20
- # Currency-to-financial-account destination assignments.
21
+ # Supported currency-to-financial-account destination assignments.
21
22
  #
22
23
  # Optional in the API payload; omitted values default to `nil`. Wire name: `destinations`.
23
- # @return [Hash{String => String}, nil]
24
+ # @return [Inttegro::Payout::Destinations, nil]
25
+ #
26
+ # @!attribute [r] fx_enabled
27
+ # Updated foreign-exchange setting, returned by FX mutations.
28
+ #
29
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `fx_enabled`.
30
+ # @return [Boolean, nil]
24
31
  #
25
32
  # @!attribute [r] id
26
33
  # Payout settings identifier
@@ -29,12 +36,13 @@ module Inttegro
29
36
  # @return [String, nil]
30
37
  #
31
38
  # @!attribute [r] schedule
32
- # Updated payout schedule
39
+ # Updated payout schedule returned after a settings mutation.
33
40
  #
34
41
  # Optional in the API payload; omitted values default to `nil`. Wire name: `schedule`.
35
42
  # @return [Inttegro::Payout::SettingsMutationSchedule, nil]
36
43
  class SettingsMutation < T::Struct
37
- const :destinations, T.nilable(T::Hash[String, String]), default: nil
44
+ const :destinations, T.nilable(Inttegro::Payout::Destinations), default: nil
45
+ const :fx_enabled, T.nilable(T::Boolean), default: nil
38
46
  const :id, T.nilable(String), default: nil
39
47
  const :schedule, T.nilable(Inttegro::Payout::SettingsMutationSchedule), default: nil
40
48
  end
@@ -8,7 +8,7 @@ require_relative "settings_mutation"
8
8
 
9
9
  module Inttegro
10
10
  class Payout
11
- # Typed representation of the set destinations response object in the Inttegro API.
11
+ # Response envelope containing updated payout settings.
12
12
  #
13
13
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
14
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -21,7 +21,7 @@ module Inttegro
21
21
  #
22
22
  # Optional in the API payload; omitted values default to `nil`. Wire name: `settings`.
23
23
  # @return [Inttegro::Payout::SettingsMutation, nil]
24
- class SetDestinationsResponse < T::Struct
24
+ class SettingsMutationResponse < T::Struct
25
25
  const :settings, T.nilable(Inttegro::Payout::SettingsMutation), default: nil
26
26
  end
27
27
  end
@@ -8,7 +8,7 @@ require_relative "settings_mutation_schedule_spec"
8
8
 
9
9
  module Inttegro
10
10
  class Payout
11
- # Updated payout schedule
11
+ # Updated payout schedule returned after a settings mutation.
12
12
  #
13
13
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
14
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -47,7 +47,7 @@ module Inttegro
47
47
  # @return [String]
48
48
  #
49
49
  # @!attribute [r] spec
50
- # Value of the `spec` field in the Inttegro API payload.
50
+ # Public payout schedule specification returned after a settings mutation.
51
51
  #
52
52
  # Required in the API payload. Wire name: `spec`.
53
53
  # @return [Inttegro::Payout::SettingsMutationScheduleSpec]
@@ -7,7 +7,7 @@ require_relative "base"
7
7
 
8
8
  module Inttegro
9
9
  class Payout
10
- # Typed representation of the settings mutation schedule spec object in the Inttegro API.
10
+ # Public payout schedule specification returned after a settings mutation.
11
11
  #
12
12
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
13
13
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -4,7 +4,6 @@
4
4
  # Generated from openapi/commerce.yml by bin/generate-openapi-types. Do not edit.
5
5
 
6
6
  require_relative "base"
7
- require_relative "activity_log"
8
7
  require_relative "merchant"
9
8
  require_relative "price"
10
9
  require_relative "product"
@@ -22,12 +21,6 @@ module Inttegro
22
21
  #
23
22
  # @api public
24
23
  #
25
- # @!attribute [r] activity
26
- # Recent authenticated-owner activity for the purchase intent.
27
- #
28
- # Optional in the API payload; omitted values default to `nil`. Wire name: `activity`.
29
- # @return [Inttegro::PurchaseIntent::ActivityLog, nil]
30
- #
31
24
  # @!attribute [r] allow_variants
32
25
  # Whether the intent was configured with a variant set
33
26
  #
@@ -110,7 +103,6 @@ module Inttegro
110
103
  # Optional in the API payload; omitted values default to `nil`. Wire name: `variant_set`.
111
104
  # @return [Inttegro::PurchaseIntent::VariantSet, nil]
112
105
  class PurchaseIntent
113
- const :activity, T.nilable(Inttegro::PurchaseIntent::ActivityLog), default: nil
114
106
  const :allow_variants, T::Boolean
115
107
  const :created_at, Time
116
108
  const :expires_at, T.nilable(Time), default: nil
@@ -22,6 +22,12 @@ module Inttegro
22
22
  # Required in the API payload. Wire name: `refund_id`.
23
23
  # @return [String]
24
24
  #
25
+ # @!attribute [r] reason
26
+ # Optional explanation for canceling the refund. Leading and trailing whitespace is removed.
27
+ #
28
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `reason`.
29
+ # @return [String, nil]
30
+ #
25
31
  # @!attribute [r] request_meta
26
32
  # Value of the `request_meta` field in the Inttegro API payload.
27
33
  #
@@ -29,6 +35,7 @@ module Inttegro
29
35
  # @return [Inttegro::Refund::RequestMeta, nil]
30
36
  class CancelRequest < T::Struct
31
37
  const :refund_id, String
38
+ const :reason, T.nilable(String), default: nil
32
39
  const :request_meta, T.nilable(Inttegro::Refund::RequestMeta), default: nil
33
40
  end
34
41
  end
@@ -18,6 +18,12 @@ module Inttegro
18
18
  #
19
19
  # @api public
20
20
  #
21
+ # @!attribute [r] cancel_reason
22
+ # Omitted unless a reason was supplied when the refund was canceled.
23
+ #
24
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `cancel_reason`.
25
+ # @return [String, nil]
26
+ #
21
27
  # @!attribute [r] canceled_at
22
28
  # Omitted unless the refund was canceled before processing began.
23
29
  #
@@ -61,6 +67,12 @@ module Inttegro
61
67
  # Required in the API payload. Wire name: `order_id`.
62
68
  # @return [String]
63
69
  #
70
+ # @!attribute [r] order_amount
71
+ # Total amount of the originating order captured when the refund was created.
72
+ #
73
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `order_amount`.
74
+ # @return [Inttegro::Money::Amount, nil]
75
+ #
64
76
  # @!attribute [r] processing_at
65
77
  # Omitted until processing starts.
66
78
  #
@@ -103,6 +115,7 @@ module Inttegro
103
115
  # Required in the API payload. Wire name: `total`.
104
116
  # @return [Inttegro::Money::Amount]
105
117
  class Refund
118
+ const :cancel_reason, T.nilable(String), default: nil
106
119
  const :canceled_at, T.nilable(Time), default: nil
107
120
  const :created_at, Time
108
121
  const :custom_data, T.nilable(T::Hash[String, String]), default: nil
@@ -110,6 +123,7 @@ module Inttegro
110
123
  const :id, String
111
124
  const :line_items, T::Array[Inttegro::Refund::LineItem]
112
125
  const :order_id, String
126
+ const :order_amount, T.nilable(Inttegro::Money::Amount), default: nil
113
127
  const :processing_at, T.nilable(Time), default: nil
114
128
  const :reason, Inttegro::Refund::Reason
115
129
  const :reason_details, T.nilable(String), default: nil
@@ -104,6 +104,14 @@ module Inttegro
104
104
  @http.post_resource("/orders/create", Inttegro::Order, :order, payload)
105
105
  end
106
106
 
107
+ # Create a new order and keep HTTP response metadata with the decoded order.
108
+ #
109
+ # @param payload [Hash, Inttegro::Order::CreateNewCustomer, Inttegro::Order::CreateExistingCustomer]
110
+ # @return [Inttegro::APIResponse] response whose data is an Inttegro::Order
111
+ def create_with_response(payload)
112
+ @http.post_resource_with_response("/orders/create", Inttegro::Order, :order, payload)
113
+ end
114
+
107
115
  # Retrieve an existing order by its ID.
108
116
  #
109
117
  # Returns full order details including customer, line items, payment state, and invoice information.
@@ -18,20 +18,16 @@ module Inttegro
18
18
 
19
19
  # Configure which financial account should be used for payouts in each currency.
20
20
  #
21
- # Sets payout destinations by mapping currency codes to financial account IDs. Each financial
22
- # account must be owned by your application, have push operations enabled, and its currency
23
- # must match the currency key in the destinations map.
21
+ # Sets the supported GHS payout destination. The financial account must be owned by your
22
+ # application, have push operations enabled, and use Ghana cedi.
24
23
  #
25
- # @param destinations [Hash] Map of currency codes to financial account IDs (required)
24
+ # @param destinations [Inttegro::Payout::Destinations] supported destination assignments
26
25
  #
27
26
  # @return [Inttegro::Payout::SettingsMutation] Updated payout settings
28
27
  #
29
- # @example Set payout destinations for multiple currencies
28
+ # @example Set the GHS payout destination
30
29
  # result = client.payouts.set_destinations(
31
- # destinations: {
32
- # 'ghs' => 'fa_1234567890abcdef',
33
- # 'usd' => 'fa_0987654321fedcba'
34
- # }
30
+ # destinations: Inttegro::Payout::Destinations.new(ghs: "fa_1234567890abcdef")
35
31
  # )
36
32
  #
37
33
  # puts "Destinations configured: #{result.destinations}"
@@ -110,7 +106,7 @@ module Inttegro
110
106
  # Important: FX conversion incurs additional fees beyond standard payout fees, and exchange rates are
111
107
  # determined at payout execution time. FX-enabled payouts require approval and special configuration.
112
108
  #
113
- # @return [Inttegro::Payout::SettingsLookup] Updated payout settings
109
+ # @return [Inttegro::Payout::SettingsMutation] Updated payout settings
114
110
  #
115
111
  # @example Enable foreign exchange for payouts
116
112
  # result = client.payouts.enable_fx
@@ -119,7 +115,7 @@ module Inttegro
119
115
  #
120
116
  # @see https://studio.inttegro.com/enable-fx-payouts for FX payout guide
121
117
  def enable_fx
122
- @http.post_resource("/payouts/enable_fx", Inttegro::Payout::SettingsLookup, :settings, {})
118
+ @http.post_resource("/payouts/enable_fx", Inttegro::Payout::SettingsMutation, :settings, {})
123
119
  end
124
120
 
125
121
  # Disable foreign exchange conversion for payouts.
@@ -127,7 +123,7 @@ module Inttegro
127
123
  # Disables FX conversion, restricting payouts to accounts that match the transaction currency.
128
124
  # After disabling FX, GHS balance can only be paid out to GHS accounts, USD balance only to USD accounts, etc.
129
125
  #
130
- # @return [Inttegro::Payout::SettingsLookup] Updated payout settings
126
+ # @return [Inttegro::Payout::SettingsMutation] Updated payout settings
131
127
  #
132
128
  # @example Disable foreign exchange for payouts
133
129
  # result = client.payouts.disable_fx
@@ -136,46 +132,33 @@ module Inttegro
136
132
  #
137
133
  # @see https://studio.inttegro.com/disable-fx-payouts for FX payout guide
138
134
  def disable_fx
139
- @http.post_resource("/payouts/disable_fx", Inttegro::Payout::SettingsLookup, :settings, {})
135
+ @http.post_resource("/payouts/disable_fx", Inttegro::Payout::SettingsMutation, :settings, {})
140
136
  end
141
137
 
142
138
  # Retrieve a paginated list of payouts.
143
139
  #
144
- # Returns payouts in reverse chronological order (most recent first). Use the has_more field
145
- # and page parameter to navigate through results. Supports filtering by status and time range.
140
+ # Returns payouts in reverse chronological order (most recent first).
146
141
  #
147
- # @param payload [Hash, Inttegro::Payout::PageRequest] Pagination and filter parameters (optional)
148
- # @option payload [Integer] :page Page number to retrieve (minimum 1, default: 1)
149
- # @option payload [Integer] :per_page Number of results per page (minimum 1, maximum 100, default: 10)
150
- # @option payload [String] :status Filter by payout status (e.g., 'pending', 'paid', 'failed')
151
- # @option payload [Time] :created_after Filter payouts created after this timestamp
152
- # @option payload [Time] :created_before Filter payouts created before this timestamp
142
+ # @param payload [Inttegro::Payout::PageRequest] Typed pagination parameters
153
143
  #
154
144
  # @return [Inttegro::Payout::Page] Paginated list of payouts
155
145
  #
156
146
  # @example Get first page of payouts
157
147
  # result = client.payouts.page(
158
- # per_page: 25,
159
- # page: 1
148
+ # Inttegro::Payout::PageRequest.new(page_number: 1, page_size: 25)
160
149
  # )
161
150
  #
162
151
  # puts "Retrieved #{result.payouts&.length || 0} payouts"
163
152
  #
164
- # @example Filter by status
165
- # paid_payouts = client.payouts.page(
166
- # status: 'paid',
167
- # per_page: 50
168
- # )
169
- #
170
153
  # @see https://studio.inttegro.com/pagination for pagination guide
171
154
  # @see https://studio.inttegro.com/product-payouts for payouts overview
172
- def page(payload = {})
173
- @http.post_resource("/payouts/page", Inttegro::Payout::Page, :page, payload || {})
155
+ def page(payload)
156
+ @http.post_resource("/payouts/page", Inttegro::Payout::Page, :page, payload)
174
157
  end
175
158
 
176
159
  # Schedule a payout from the application's available balance.
177
160
  #
178
- # @param payload [Hash, Inttegro::Schedule::PayoutRequest] amount, destination, and execution fields
161
+ # @param payload [Inttegro::Schedule::PayoutRequest] typed amount, destination, and execution fields
179
162
  # @return [Inttegro::Payout] scheduled payout
180
163
  def schedule(payload)
181
164
  @http.post_resource("/payouts/schedule", Inttegro::Payout, :payout, payload)
@@ -23,12 +23,15 @@ module Inttegro
23
23
  # Cancel a pending refund before processing claims it.
24
24
  #
25
25
  # @param refund_id [String] unique refund identifier
26
+ # @param reason [String, nil] optional explanation for canceling the refund
26
27
  # @return [Inttegro::Refund] canceled refund
27
- def cancel(refund_id:)
28
+ def cancel(refund_id:, reason: nil)
29
+ payload = T.let({ refund_id: refund_id }, Inttegro::Types::Payload)
30
+ payload[:reason] = reason unless reason.nil?
28
31
  @http.post_resource(
29
32
  "/refunds/cancel",
30
33
  Inttegro::Refund, :refund,
31
- { refund_id: refund_id }
34
+ payload
32
35
  )
33
36
  end
34
37
 
@@ -7,7 +7,7 @@ require_relative "base"
7
7
 
8
8
  module Inttegro
9
9
  module Schedule
10
- # Typed representation of the payout request object in the Inttegro API.
10
+ # Parameters for scheduling a payout.
11
11
  #
12
12
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
13
13
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -16,25 +16,25 @@ module Inttegro
16
16
  # @api public
17
17
  #
18
18
  # @!attribute [r] destination_id
19
- # Financial account that should receive the payout
19
+ # Financial account that should receive the payout.
20
20
  #
21
21
  # Required in the API payload. Wire name: `destination_id`.
22
22
  # @return [String]
23
23
  #
24
24
  # @!attribute [r] execute_after
25
- # Optional future time after which execution may begin
25
+ # Optional future time after which execution may begin.
26
26
  #
27
27
  # Optional in the API payload; omitted values default to `nil`. Wire name: `execute_after`.
28
28
  # @return [Time, nil]
29
29
  #
30
30
  # @!attribute [r] max_amount
31
- # Maximum amount, in the smallest currency unit, that this payout may transfer
31
+ # Maximum amount, in the smallest currency unit, that this payout may transfer.
32
32
  #
33
33
  # Optional in the API payload; omitted values default to `nil`. Wire name: `max_amount`.
34
34
  # @return [Integer, nil]
35
35
  #
36
36
  # @!attribute [r] reference
37
- # Merchant reference carried on the payout
37
+ # Merchant reference carried on the payout.
38
38
  #
39
39
  # Required in the API payload. Wire name: `reference`.
40
40
  # @return [String]
@@ -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
+
8
+ module Inttegro
9
+ module Shared
10
+ # Curated response metadata. This is body metadata and does not replace native HTTP status or
11
+ # response headers.
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] request_id
20
+ # Inttegro request identifier for this API response.
21
+ #
22
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `request_id`.
23
+ # @return [String, nil]
24
+ #
25
+ # @!attribute [r] debug
26
+ # Optional debug information returned only when explicitly enabled and authorized.
27
+ #
28
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `debug`.
29
+ # @return [Hash{String => Object}, nil]
30
+ class ResponseMeta < T::Struct
31
+ const :request_id, T.nilable(String), default: nil
32
+ const :debug, T.nilable(T::Hash[String, Object]), default: nil
33
+ end
34
+ end
35
+ end
@@ -2,5 +2,5 @@
2
2
  # typed: strict
3
3
 
4
4
  module Inttegro
5
- VERSION = "6.0.1"
5
+ VERSION = "7.0.0"
6
6
  end
data/lib/inttegro.rb CHANGED
@@ -4,6 +4,7 @@
4
4
  require "sorbet-runtime"
5
5
 
6
6
  require_relative "inttegro/types"
7
+ require_relative "inttegro/api_response"
7
8
  require_relative "inttegro/client"
8
9
  require_relative "inttegro/errors"
9
10
  require_relative "inttegro/error_reporting"
@@ -250,6 +250,9 @@ module Inttegro
250
250
  sig { params(payload: T.any(T.any(Inttegro::Order::CreateNewCustomer, Inttegro::Order::CreateExistingCustomer), Inttegro::Types::Payload)).returns(Inttegro::Order) }
251
251
  def create(payload); end
252
252
 
253
+ sig { params(payload: T.any(T.any(Inttegro::Order::CreateNewCustomer, Inttegro::Order::CreateExistingCustomer), Inttegro::Types::Payload)).returns(Inttegro::APIResponse) }
254
+ def create_with_response(payload); end
255
+
253
256
  sig { params(order_id: String, request_meta: T.nilable(Inttegro::Types::Payload)).returns(Inttegro::Order) }
254
257
  def finalize(order_id:, request_meta: nil); end
255
258
 
@@ -353,25 +356,25 @@ module Inttegro
353
356
  sig { returns(Inttegro::Payout::SettingsMutation) }
354
357
  def disable_automatic(); end
355
358
 
356
- sig { returns(Inttegro::Payout::SettingsLookup) }
359
+ sig { returns(Inttegro::Payout::SettingsMutation) }
357
360
  def disable_fx(); end
358
361
 
359
362
  sig { returns(Inttegro::Payout::SettingsMutation) }
360
363
  def enable_automatic(); end
361
364
 
362
- sig { returns(Inttegro::Payout::SettingsLookup) }
365
+ sig { returns(Inttegro::Payout::SettingsMutation) }
363
366
  def enable_fx(); end
364
367
 
365
368
  sig { params(payout_id: String).returns(Inttegro::Payout) }
366
369
  def lookup(payout_id:); end
367
370
 
368
- sig { params(payload: T.nilable(T.any(Inttegro::Payout::PageRequest, Inttegro::Types::Payload))).returns(Inttegro::Payout::Page) }
369
- def page(payload = nil); end
371
+ sig { params(payload: Inttegro::Payout::PageRequest).returns(Inttegro::Payout::Page) }
372
+ def page(payload); end
370
373
 
371
- sig { params(payload: T.any(Inttegro::Schedule::PayoutRequest, Inttegro::Types::Payload)).returns(Inttegro::Payout) }
374
+ sig { params(payload: Inttegro::Schedule::PayoutRequest).returns(Inttegro::Payout) }
372
375
  def schedule(payload); end
373
376
 
374
- sig { params(destinations: T::Hash[String, String]).returns(Inttegro::Payout::SettingsMutation) }
377
+ sig { params(destinations: Inttegro::Payout::Destinations).returns(Inttegro::Payout::SettingsMutation) }
375
378
  def set_destinations(destinations:); end
376
379
 
377
380
  sig { returns(Inttegro::Payout::SettingsLookup) }
@@ -460,8 +463,8 @@ module Inttegro
460
463
  sig { params(http: Inttegro::HTTPClient).void }
461
464
  def initialize(http); end
462
465
 
463
- sig { params(refund_id: String).returns(Inttegro::Refund) }
464
- def cancel(refund_id:); end
466
+ sig { params(refund_id: String, reason: T.nilable(Inttegro::Types::WireValue)).returns(Inttegro::Refund) }
467
+ def cancel(refund_id:, reason: nil); end
465
468
 
466
469
  sig { params(payload: T.any(Inttegro::Refund::CreateRequest, Inttegro::Types::Payload)).returns(Inttegro::Refund) }
467
470
  def create(payload); end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inttegro
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Inttegro Engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-11 00:00:00.000000000 Z
11
+ date: 2026-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime
@@ -80,6 +80,7 @@ files:
80
80
  - Rakefile
81
81
  - SECURITY.md
82
82
  - lib/inttegro.rb
83
+ - lib/inttegro/api_response.rb
83
84
  - lib/inttegro/app/application.rb
84
85
  - lib/inttegro/app/base.rb
85
86
  - lib/inttegro/app/create_request.rb
@@ -528,26 +529,25 @@ files:
528
529
  - lib/inttegro/payment_method/verification.rb
529
530
  - lib/inttegro/payout/base.rb
530
531
  - lib/inttegro/payout/cancel_request.rb
531
- - lib/inttegro/payout/cancel_response.rb
532
+ - lib/inttegro/payout/destinations.rb
532
533
  - lib/inttegro/payout/disable_automatic_request.rb
533
534
  - lib/inttegro/payout/disable_automatic_response.rb
534
535
  - lib/inttegro/payout/enable_automatic_request.rb
535
- - lib/inttegro/payout/enable_automatic_response.rb
536
536
  - lib/inttegro/payout/error.rb
537
537
  - lib/inttegro/payout/get_settings_request.rb
538
- - lib/inttegro/payout/get_settings_response.rb
539
538
  - lib/inttegro/payout/lookup_request.rb
540
- - lib/inttegro/payout/lookup_response.rb
541
539
  - lib/inttegro/payout/page.rb
542
540
  - lib/inttegro/payout/page_request.rb
543
541
  - lib/inttegro/payout/page_response.rb
544
542
  - lib/inttegro/payout/payout.rb
543
+ - lib/inttegro/payout/response.rb
545
544
  - lib/inttegro/payout/set_destinations_request.rb
546
- - lib/inttegro/payout/set_destinations_response.rb
547
545
  - lib/inttegro/payout/settings_lookup.rb
546
+ - lib/inttegro/payout/settings_lookup_response.rb
548
547
  - lib/inttegro/payout/settings_lookup_schedule.rb
549
548
  - lib/inttegro/payout/settings_lookup_schedule_aging_spec.rb
550
549
  - lib/inttegro/payout/settings_mutation.rb
550
+ - lib/inttegro/payout/settings_mutation_response.rb
551
551
  - lib/inttegro/payout/settings_mutation_schedule.rb
552
552
  - lib/inttegro/payout/settings_mutation_schedule_spec.rb
553
553
  - lib/inttegro/payout/status.rb
@@ -604,11 +604,6 @@ files:
604
604
  - lib/inttegro/product/update_request.rb
605
605
  - lib/inttegro/product/update_response.rb
606
606
  - lib/inttegro/product/updated.rb
607
- - lib/inttegro/purchase_intent/activity.rb
608
- - lib/inttegro/purchase_intent/activity_attribution.rb
609
- - lib/inttegro/purchase_intent/activity_log.rb
610
- - lib/inttegro/purchase_intent/activity_type.rb
611
- - lib/inttegro/purchase_intent/activity_visitor.rb
612
607
  - lib/inttegro/purchase_intent/base.rb
613
608
  - lib/inttegro/purchase_intent/cancel_request.rb
614
609
  - lib/inttegro/purchase_intent/create_request.rb
@@ -688,7 +683,6 @@ files:
688
683
  - lib/inttegro/schedule/lookup_request.rb
689
684
  - lib/inttegro/schedule/lookup_response.rb
690
685
  - lib/inttegro/schedule/payout_request.rb
691
- - lib/inttegro/schedule/payout_response.rb
692
686
  - lib/inttegro/schedule/response.rb
693
687
  - lib/inttegro/secret_key/auth_result.rb
694
688
  - lib/inttegro/secret_key/base.rb
@@ -738,6 +732,7 @@ files:
738
732
  - lib/inttegro/shared/mobile_money_network.rb
739
733
  - lib/inttegro/shared/request_confirmation_request.rb
740
734
  - lib/inttegro/shared/resource_supply.rb
735
+ - lib/inttegro/shared/response_meta.rb
741
736
  - lib/inttegro/shared/shipping.rb
742
737
  - lib/inttegro/shared/shipping_details.rb
743
738
  - lib/inttegro/shared/shipping_line_item.rb
@@ -786,10 +781,10 @@ licenses:
786
781
  - MIT
787
782
  metadata:
788
783
  homepage_uri: https://studio.inttegro.com
789
- source_code_uri: https://github.com/zebodotdev/inttegro-sdk-ruby
784
+ source_code_uri: https://github.com/inttegro/inttegro-sdk-ruby
790
785
  documentation_uri: https://ruby.inttegro.dev/
791
- changelog_uri: https://github.com/zebodotdev/inttegro-sdk-ruby/blob/master/CHANGELOG.md
792
- github_repo: ssh://github.com/zebodotdev/inttegro-sdk-ruby
786
+ changelog_uri: https://github.com/inttegro/inttegro-sdk-ruby/blob/master/CHANGELOG.md
787
+ github_repo: ssh://github.com/inttegro/inttegro-sdk-ruby
793
788
  rubygems_mfa_required: 'true'
794
789
  post_install_message:
795
790
  rdoc_options: []
@@ -1,28 +0,0 @@
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 "settings_mutation"
8
-
9
- module Inttegro
10
- class Payout
11
- # Typed representation of the enable automatic response 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] settings
20
- # Payout settings fields returned after a mutation
21
- #
22
- # Optional in the API payload; omitted values default to `nil`. Wire name: `settings`.
23
- # @return [Inttegro::Payout::SettingsMutation, nil]
24
- class EnableAutomaticResponse < T::Struct
25
- const :settings, T.nilable(Inttegro::Payout::SettingsMutation), default: nil
26
- end
27
- end
28
- end