inttegro 1.0.0 → 2.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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Dockerfile +1 -1
  4. data/README.md +9 -7
  5. data/SECURITY.md +11 -0
  6. data/lib/inttegro/enums.rb +2 -2
  7. data/lib/inttegro/generated/enums.rb +220 -328
  8. data/lib/inttegro/generated/models.rb +3705 -3830
  9. data/lib/inttegro/generated/operations.rb +230 -230
  10. data/lib/inttegro/http_client.rb +7 -4
  11. data/lib/inttegro/models.rb +101 -104
  12. data/lib/inttegro/resources/apps.rb +3 -3
  13. data/lib/inttegro/resources/balance_transactions.rb +2 -2
  14. data/lib/inttegro/resources/balances.rb +1 -1
  15. data/lib/inttegro/resources/broadcasts.rb +2 -2
  16. data/lib/inttegro/resources/chimes.rb +5 -5
  17. data/lib/inttegro/resources/customers.rb +4 -4
  18. data/lib/inttegro/resources/file_links.rb +4 -4
  19. data/lib/inttegro/resources/file_references.rb +1 -1
  20. data/lib/inttegro/resources/files.rb +4 -4
  21. data/lib/inttegro/resources/financial_accounts.rb +11 -11
  22. data/lib/inttegro/resources/keys.rb +6 -6
  23. data/lib/inttegro/resources/message_templates.rb +7 -7
  24. data/lib/inttegro/resources/orders.rb +72 -69
  25. data/lib/inttegro/resources/otp.rb +4 -4
  26. data/lib/inttegro/resources/payment_methods.rb +18 -18
  27. data/lib/inttegro/resources/payouts.rb +17 -17
  28. data/lib/inttegro/resources/prices.rb +7 -7
  29. data/lib/inttegro/resources/products.rb +9 -9
  30. data/lib/inttegro/resources/purchase_intents.rb +5 -5
  31. data/lib/inttegro/resources/refunds.rb +4 -4
  32. data/lib/inttegro/resources/schedules.rb +2 -2
  33. data/lib/inttegro/resources/spec.rb +1 -1
  34. data/lib/inttegro/resources/upload_requests.rb +6 -6
  35. data/lib/inttegro/response_object.rb +1 -1
  36. data/lib/inttegro/version.rb +1 -1
  37. data/rbi/inttegro/generated.rbi +124 -124
  38. metadata +3 -2
@@ -7,126 +7,123 @@ require_relative "generated/models"
7
7
  require_relative "types"
8
8
 
9
9
  module Inttegro
10
- module Models
11
- extend T::Sig
12
-
13
- # Backward-compatible acronym spellings. New code should use the OpenAPI
14
- # names, which preserve acronyms exactly.
15
- InitiateOtpResponse = InitiateOTPResponse
16
- LookupOtpResponse = LookupOTPResponse
17
- VerifyOtpResponse = VerifyOTPResponse
18
- OtpTransaction = OTPTransaction
19
- OtpTransmission = OTPTransmission
20
- OtpVerificationAttempt = OTPVerificationAttempt
21
-
22
- # Backward-compatible response names whose schemas now have a single,
23
- # endpoint-specific OpenAPI name.
24
- BalancesResponse = BalanceSnapshotResponse
25
- BalanceTransactionsResponse = BalanceTransactionPageResponse
26
- CustomerPageResponse = PageCustomersResponse
27
- OrderPageResponse = PageOrdersResponse
28
- ProductPageResponse = PageProductsResponse
29
- ScheduleChimeResponse = ScheduleResponse
30
- CountrySpecificationsResponse = ListCountrySpecsResponse
31
- FinancialAccountResponse = LookupFinancialAccountResponse
32
- PaymentMethodResponse = LookupPaymentMethodResponse
33
- PaymentMethodSettingsResponse = GetPaymentMethodSettingsResponse
34
- PayoutSettingsResponse = GetPayoutSettingsResponse
35
- PayoutPageResponse = PagePayoutsResponse
36
-
37
- class PaymentMethodVerificationResponse < T::Struct
38
- const :verification, T.nilable(PaymentMethodObjectVerification), default: nil
39
- end
40
-
41
- class PaymentMethodDeleteResponse < T::Struct
42
- const :deleted, T::Boolean
43
- const :payment_method_id, String
44
- end
10
+ extend T::Sig
11
+
12
+ # Backward-compatible acronym spellings. New code should use the OpenAPI
13
+ # names, which preserve acronyms exactly.
14
+ InitiateOtpResponse = InitiateOTPResponse
15
+ LookupOtpResponse = LookupOTPResponse
16
+ VerifyOtpResponse = VerifyOTPResponse
17
+ OtpTransaction = OTPTransaction
18
+ OtpTransmission = OTPTransmission
19
+ OtpVerificationAttempt = OTPVerificationAttempt
20
+
21
+ # Backward-compatible response names whose schemas now have a single,
22
+ # endpoint-specific OpenAPI name.
23
+ BalancesResponse = BalanceSnapshotResponse
24
+ BalanceTransactionsResponse = BalanceTransactionPageResponse
25
+ CustomerPageResponse = PageCustomersResponse
26
+ ProductPageResponse = PageProductsResponse
27
+ ScheduleChimeResponse = ScheduleResponse
28
+ CountrySpecificationsResponse = ListCountrySpecsResponse
29
+ FinancialAccountResponse = LookupFinancialAccountResponse
30
+ PaymentMethodResponse = LookupPaymentMethodResponse
31
+ PaymentMethodSettingsResponse = GetPaymentMethodSettingsResponse
32
+ PayoutSettingsResponse = GetPayoutSettingsResponse
33
+ PayoutPageResponse = PagePayoutsResponse
34
+
35
+ class PaymentMethodVerificationResponse < T::Struct
36
+ const :verification, T.nilable(PaymentMethodObjectVerification), default: nil
37
+ end
45
38
 
46
- class SetDefaultUnitPriceRequest < T::Struct
47
- const :product_id, String
48
- const :price_id, String
49
- end
39
+ class PaymentMethodDeleteResponse < T::Struct
40
+ const :deleted, T::Boolean
41
+ const :payment_method_id, String
42
+ end
50
43
 
51
- # /otp/cancel predates the public OpenAPI surface. Keep its SDK model typed
52
- # for compatibility without representing it as a documented operation.
53
- class OTPCanceledTransaction < T::Struct
54
- const :id, T.nilable(String), default: nil
55
- const :status, T.nilable(Inttegro::Enums::OTPStatus), default: nil
56
- const :full_message, T.nilable(String), default: nil
57
- const :recipient, T.nilable(String), default: nil
58
- const :sender, T.nilable(String), default: nil
59
- const :mechanism, T.nilable(String), default: nil
60
- const :gateway, T.nilable(String), default: nil
61
- const :preferred_gateway, T.nilable(String), default: nil
62
- const :created_at, T.nilable(String), default: nil
63
- const :delivered_at, T.nilable(String), default: nil
64
- const :verifiable_until, T.nilable(String), default: nil
65
- const :canceled_at, T.nilable(String), default: nil
66
- const :cancel_reason, T.nilable(String), default: nil
67
- end
44
+ class SetDefaultUnitPriceRequest < T::Struct
45
+ const :product_id, String
46
+ const :price_id, String
47
+ end
68
48
 
69
- class CancelOTPResponse < T::Struct
70
- const :transaction, T.nilable(OTPCanceledTransaction), default: nil
71
- const :error, T.nilable(Error), default: nil
72
- end
49
+ # /otp/cancel predates the public OpenAPI surface. Keep its SDK model typed
50
+ # for compatibility without representing it as a documented operation.
51
+ class OTPCanceledTransaction < T::Struct
52
+ const :id, T.nilable(String), default: nil
53
+ const :status, T.nilable(Inttegro::OTPStatus), default: nil
54
+ const :full_message, T.nilable(String), default: nil
55
+ const :recipient, T.nilable(String), default: nil
56
+ const :sender, T.nilable(String), default: nil
57
+ const :mechanism, T.nilable(String), default: nil
58
+ const :gateway, T.nilable(String), default: nil
59
+ const :preferred_gateway, T.nilable(String), default: nil
60
+ const :created_at, T.nilable(String), default: nil
61
+ const :delivered_at, T.nilable(String), default: nil
62
+ const :verifiable_until, T.nilable(String), default: nil
63
+ const :canceled_at, T.nilable(String), default: nil
64
+ const :cancel_reason, T.nilable(String), default: nil
65
+ end
73
66
 
74
- OtpCanceledTransaction = OTPCanceledTransaction
75
- CancelOtpResponse = CancelOTPResponse
67
+ class CancelOTPResponse < T::Struct
68
+ const :transaction, T.nilable(OTPCanceledTransaction), default: nil
69
+ const :error, T.nilable(Error), default: nil
70
+ end
76
71
 
77
- class BalanceTransaction
78
- extend T::Sig
72
+ OtpCanceledTransaction = OTPCanceledTransaction
73
+ CancelOtpResponse = CancelOTPResponse
79
74
 
80
- sig { returns(T.nilable(String)) }
81
- def source_id
82
- payment = payment_id
83
- refund = refund_id
84
- if type == Inttegro::Enums::BalanceTransactionType::PAYMENT && payment && !payment.empty? && refund.nil?
85
- return payment
86
- end
87
- if type == Inttegro::Enums::BalanceTransactionType::REFUND && refund && !refund.empty? && payment.nil?
88
- return refund
89
- end
75
+ class BalanceTransaction
76
+ extend T::Sig
90
77
 
91
- nil
78
+ sig { returns(T.nilable(String)) }
79
+ def source_id
80
+ payment = payment_id
81
+ refund = refund_id
82
+ if type == Inttegro::BalanceTransactionType::PAYMENT && payment && !payment.empty? && refund.nil?
83
+ return payment
92
84
  end
93
-
94
- sig { returns(T::Boolean) }
95
- def valid_source?
96
- !source_id.nil?
85
+ if type == Inttegro::BalanceTransactionType::REFUND && refund && !refund.empty? && payment.nil?
86
+ return refund
97
87
  end
98
88
 
99
- sig { returns(T::Boolean) }
100
- def valid?
101
- !id.empty? && !order_id.empty? && !created_at.empty? && valid_source?
102
- end
89
+ nil
103
90
  end
104
91
 
105
- sig { params(value: Object, klass: T::Class[T::Struct]).returns(T::Struct) }
106
- def self.deserialize(value, klass)
107
- data = stringify_json_keys(value)
108
- raise TypeError, "expected an object for #{klass}, got #{data.class}" unless data.is_a?(Hash)
92
+ sig { returns(T::Boolean) }
93
+ def valid_source?
94
+ !source_id.nil?
95
+ end
109
96
 
110
- T.cast(klass, T.class_of(T::Struct)).from_hash(data)
97
+ sig { returns(T::Boolean) }
98
+ def valid?
99
+ !id.empty? && !order_id.empty? && !created_at.empty? && valid_source?
111
100
  end
101
+ end
102
+
103
+ sig { params(value: Object, klass: T::Class[T::Struct]).returns(T::Struct) }
104
+ def self.deserialize(value, klass)
105
+ data = stringify_json_keys(value)
106
+ raise TypeError, "expected an object for #{klass}, got #{data.class}" unless data.is_a?(Hash)
107
+
108
+ T.cast(klass, T.class_of(T::Struct)).from_hash(data)
109
+ end
112
110
 
113
- sig { params(value: Object).returns(Object) }
114
- def self.stringify_json_keys(value)
115
- case value
116
- when T::Struct
117
- stringify_json_keys(value.serialize)
118
- when T::Enum
119
- value.serialize
120
- when Hash
121
- value.each_with_object({}) do |(key, item), output|
122
- output[key.to_s] = stringify_json_keys(item)
123
- end
124
- when Array
125
- value.map { |item| stringify_json_keys(item) }
126
- else
127
- value
111
+ sig { params(value: Object).returns(Object) }
112
+ def self.stringify_json_keys(value)
113
+ case value
114
+ when T::Struct
115
+ stringify_json_keys(value.serialize)
116
+ when T::Enum
117
+ value.serialize
118
+ when Hash
119
+ value.each_with_object({}) do |(key, item), output|
120
+ output[key.to_s] = stringify_json_keys(item)
128
121
  end
122
+ when Array
123
+ value.map { |item| stringify_json_keys(item) }
124
+ else
125
+ value
129
126
  end
130
- private_class_method :stringify_json_keys
131
127
  end
128
+ private_class_method :stringify_json_keys
132
129
  end
@@ -9,15 +9,15 @@ module Inttegro
9
9
  end
10
10
 
11
11
  def create(payload)
12
- @http.post_model("/apps/create", Inttegro::Models::CreateApplicationResponse, payload)
12
+ @http.post_model("/apps/create", Inttegro::CreateApplicationResponse, payload)
13
13
  end
14
14
 
15
15
  def lookup
16
- @http.post_model("/apps/lookup", Inttegro::Models::LookupApplicationResponse, {})
16
+ @http.post_model("/apps/lookup", Inttegro::LookupApplicationResponse, {})
17
17
  end
18
18
 
19
19
  def update(payload)
20
- @http.post_model("/apps/update", Inttegro::Models::UpdateApplicationResponse, payload)
20
+ @http.post_model("/apps/update", Inttegro::UpdateApplicationResponse, payload)
21
21
  end
22
22
  end
23
23
  end
@@ -11,7 +11,7 @@ module Inttegro
11
11
  def lookup(transaction_id:)
12
12
  @http.post_model(
13
13
  "/balance_transactions/lookup",
14
- Inttegro::Models::BalanceTransactionResponse,
14
+ Inttegro::BalanceTransactionResponse,
15
15
  { transaction_id: transaction_id }
16
16
  )
17
17
  end
@@ -19,7 +19,7 @@ module Inttegro
19
19
  def page(payload = {})
20
20
  @http.post_model(
21
21
  "/balance_transactions/page",
22
- Inttegro::Models::BalanceTransactionPageResponse,
22
+ Inttegro::BalanceTransactionPageResponse,
23
23
  payload || {}
24
24
  )
25
25
  end
@@ -9,7 +9,7 @@ module Inttegro
9
9
  end
10
10
 
11
11
  def get
12
- @http.post_model("/balances", Inttegro::Models::BalanceSnapshotResponse, {})
12
+ @http.post_model("/balances", Inttegro::BalanceSnapshotResponse, {})
13
13
  end
14
14
  end
15
15
  end
@@ -11,7 +11,7 @@ module Inttegro
11
11
  def lookup(broadcast_id:)
12
12
  @http.post_model(
13
13
  "/broadcasts/lookup",
14
- Inttegro::Models::LookupBroadcastResponse,
14
+ Inttegro::LookupBroadcastResponse,
15
15
  { broadcast_id: broadcast_id }
16
16
  )
17
17
  end
@@ -19,7 +19,7 @@ module Inttegro
19
19
  def cancel(broadcast_id:)
20
20
  @http.post_model(
21
21
  "/broadcasts/cancel",
22
- Inttegro::Models::BroadcastCancelResponse,
22
+ Inttegro::BroadcastCancelResponse,
23
23
  { broadcast_id: broadcast_id }
24
24
  )
25
25
  end
@@ -9,23 +9,23 @@ module Inttegro
9
9
  end
10
10
 
11
11
  def send(payload)
12
- @http.post_model("/chimes/send", Inttegro::Models::ChimeResponse, payload)
12
+ @http.post_model("/chimes/send", Inttegro::ChimeResponse, payload)
13
13
  end
14
14
 
15
15
  def lookup(chime_id:)
16
- @http.post_model("/chimes/lookup", Inttegro::Models::ChimeResponse, { chime_id: chime_id })
16
+ @http.post_model("/chimes/lookup", Inttegro::ChimeResponse, { chime_id: chime_id })
17
17
  end
18
18
 
19
19
  def page(payload = {})
20
- @http.post_model("/chimes/page", Inttegro::Models::PageChimesResponse, payload || {})
20
+ @http.post_model("/chimes/page", Inttegro::PageChimesResponse, payload || {})
21
21
  end
22
22
 
23
23
  def schedule(payload)
24
- @http.post_model("/chimes/schedule", Inttegro::Models::ScheduleResponse, payload)
24
+ @http.post_model("/chimes/schedule", Inttegro::ScheduleResponse, payload)
25
25
  end
26
26
 
27
27
  def broadcast(payload)
28
- @http.post_model("/chimes/broadcast", Inttegro::Models::BroadcastResponse, payload)
28
+ @http.post_model("/chimes/broadcast", Inttegro::BroadcastResponse, payload)
29
29
  end
30
30
  end
31
31
  end
@@ -9,19 +9,19 @@ module Inttegro
9
9
  end
10
10
 
11
11
  def create(payload)
12
- @http.post_model("/customers/create", Inttegro::Models::CustomerResponse, payload)
12
+ @http.post_model("/customers/create", Inttegro::CustomerResponse, payload)
13
13
  end
14
14
 
15
15
  def update(payload)
16
- @http.post_model("/customers/update", Inttegro::Models::CustomerResponse, payload)
16
+ @http.post_model("/customers/update", Inttegro::CustomerResponse, payload)
17
17
  end
18
18
 
19
19
  def lookup(customer_id:)
20
- @http.post_model("/customers/lookup", Inttegro::Models::CustomerResponse, { customer_id: customer_id })
20
+ @http.post_model("/customers/lookup", Inttegro::CustomerResponse, { customer_id: customer_id })
21
21
  end
22
22
 
23
23
  def page(payload = {})
24
- @http.post_model("/customers/page", Inttegro::Models::PageCustomersResponse, payload || {})
24
+ @http.post_model("/customers/page", Inttegro::PageCustomersResponse, payload || {})
25
25
  end
26
26
  end
27
27
  end
@@ -11,24 +11,24 @@ module Inttegro
11
11
  def create(payload, idempotency_key: nil)
12
12
  @http.post_model(
13
13
  "/file_links/create",
14
- Inttegro::Models::CreateFileLinkResponse,
14
+ Inttegro::CreateFileLinkResponse,
15
15
  payload,
16
16
  headers: headers(idempotency_key)
17
17
  )
18
18
  end
19
19
 
20
20
  def lookup(id:)
21
- @http.post_model("/file_links/lookup", Inttegro::Models::FileLinkResponse, { id: id })
21
+ @http.post_model("/file_links/lookup", Inttegro::FileLinkResponse, { id: id })
22
22
  end
23
23
 
24
24
  def page(payload = {})
25
- @http.post_model("/file_links/page", Inttegro::Models::FileLinkPageResponse, payload || {})
25
+ @http.post_model("/file_links/page", Inttegro::FileLinkPageResponse, payload || {})
26
26
  end
27
27
 
28
28
  def revoke(payload, idempotency_key: nil)
29
29
  @http.post_model(
30
30
  "/file_links/revoke",
31
- Inttegro::Models::FileLinkResponse,
31
+ Inttegro::FileLinkResponse,
32
32
  payload,
33
33
  headers: headers(idempotency_key)
34
34
  )
@@ -11,7 +11,7 @@ module Inttegro
11
11
  def reconcile(payload)
12
12
  @http.post_model(
13
13
  "/file_references/reconcile",
14
- Inttegro::Models::FileReferenceReconcileResponse,
14
+ Inttegro::FileReferenceReconcileResponse,
15
15
  payload
16
16
  )
17
17
  end
@@ -12,7 +12,7 @@ module Inttegro
12
12
  headers = idempotency_key ? { "Idempotency-Key" => idempotency_key } : {}
13
13
  @http.post_multipart_model(
14
14
  "/files/create",
15
- Inttegro::Models::FileResponse,
15
+ Inttegro::FileResponse,
16
16
  fields: { purpose: purpose, title: title, custom_data: custom_data },
17
17
  files: { file: file },
18
18
  headers: headers
@@ -20,11 +20,11 @@ module Inttegro
20
20
  end
21
21
 
22
22
  def lookup(file_id:)
23
- @http.post_model("/files/lookup", Inttegro::Models::FileResponse, { file_id: file_id })
23
+ @http.post_model("/files/lookup", Inttegro::FileResponse, { file_id: file_id })
24
24
  end
25
25
 
26
26
  def page(payload = {})
27
- @http.post_model("/files/page", Inttegro::Models::FilePageResponse, payload || {})
27
+ @http.post_model("/files/page", Inttegro::FilePageResponse, payload || {})
28
28
  end
29
29
 
30
30
  def contents(file_id:, disposition: "attachment")
@@ -32,7 +32,7 @@ module Inttegro
32
32
  end
33
33
 
34
34
  def delete(file_id:)
35
- @http.post_model("/files/delete", Inttegro::Models::FileResponse, { file_id: file_id })
35
+ @http.post_model("/files/delete", Inttegro::FileResponse, { file_id: file_id })
36
36
  end
37
37
  end
38
38
  end
@@ -11,7 +11,7 @@ module Inttegro
11
11
  def create(payload)
12
12
  @http.post_model(
13
13
  "/financial_accounts/create",
14
- Inttegro::Models::CreateFinancialAccountResponse,
14
+ Inttegro::CreateFinancialAccountResponse,
15
15
  payload
16
16
  )
17
17
  end
@@ -19,7 +19,7 @@ module Inttegro
19
19
  def lookup(account_id:)
20
20
  @http.post_model(
21
21
  "/financial_accounts/lookup",
22
- Inttegro::Models::LookupFinancialAccountResponse,
22
+ Inttegro::LookupFinancialAccountResponse,
23
23
  { account_id: account_id }
24
24
  )
25
25
  end
@@ -27,7 +27,7 @@ module Inttegro
27
27
  def connect(payload)
28
28
  @http.post_model(
29
29
  "/financial_accounts/connect",
30
- Inttegro::Models::ConnectFinancialAccountResponse,
30
+ Inttegro::ConnectFinancialAccountResponse,
31
31
  payload
32
32
  )
33
33
  end
@@ -35,7 +35,7 @@ module Inttegro
35
35
  def page(payload = {})
36
36
  @http.post_model(
37
37
  "/financial_accounts/page",
38
- Inttegro::Models::PageFinancialAccountsResponseInline,
38
+ Inttegro::PageFinancialAccountsResponseInline,
39
39
  payload || {}
40
40
  )
41
41
  end
@@ -43,7 +43,7 @@ module Inttegro
43
43
  def update(payload)
44
44
  @http.post_model(
45
45
  "/financial_accounts/update",
46
- Inttegro::Models::UpdateFinancialAccountResponse,
46
+ Inttegro::UpdateFinancialAccountResponse,
47
47
  payload
48
48
  )
49
49
  end
@@ -51,7 +51,7 @@ module Inttegro
51
51
  def enable_push(account_id:)
52
52
  @http.post_model(
53
53
  "/financial_accounts/enable_push",
54
- Inttegro::Models::EnableFinancialAccountPushResponse,
54
+ Inttegro::EnableFinancialAccountPushResponse,
55
55
  { account_id: account_id }
56
56
  )
57
57
  end
@@ -61,7 +61,7 @@ module Inttegro
61
61
  payload[:unset_as_payout_destination] = unset_as_payout_destination unless unset_as_payout_destination.nil?
62
62
  @http.post_model(
63
63
  "/financial_accounts/disable_push",
64
- Inttegro::Models::DisableFinancialAccountPushResponse,
64
+ Inttegro::DisableFinancialAccountPushResponse,
65
65
  payload
66
66
  )
67
67
  end
@@ -69,7 +69,7 @@ module Inttegro
69
69
  def enable_pull(account_id:)
70
70
  @http.post_model(
71
71
  "/financial_accounts/enable_pull",
72
- Inttegro::Models::EnableFinancialAccountPullResponse,
72
+ Inttegro::EnableFinancialAccountPullResponse,
73
73
  { account_id: account_id }
74
74
  )
75
75
  end
@@ -77,7 +77,7 @@ module Inttegro
77
77
  def disable_pull(account_id:)
78
78
  @http.post_model(
79
79
  "/financial_accounts/disable_pull",
80
- Inttegro::Models::DisableFinancialAccountPullResponse,
80
+ Inttegro::DisableFinancialAccountPullResponse,
81
81
  { account_id: account_id }
82
82
  )
83
83
  end
@@ -87,7 +87,7 @@ module Inttegro
87
87
  payload[:unset_as_payout_destination] = unset_as_payout_destination unless unset_as_payout_destination.nil?
88
88
  @http.post_model(
89
89
  "/financial_accounts/disconnect",
90
- Inttegro::Models::DisconnectFinancialAccountResponse,
90
+ Inttegro::DisconnectFinancialAccountResponse,
91
91
  payload
92
92
  )
93
93
  end
@@ -95,7 +95,7 @@ module Inttegro
95
95
  def reconnect(account_id:)
96
96
  @http.post_model(
97
97
  "/financial_accounts/reconnect",
98
- Inttegro::Models::ReconnectFinancialAccountResponse,
98
+ Inttegro::ReconnectFinancialAccountResponse,
99
99
  { account_id: account_id }
100
100
  )
101
101
  end
@@ -9,29 +9,29 @@ module Inttegro
9
9
  end
10
10
 
11
11
  def generate(payload = {})
12
- @http.post_model("/keys/generate", Inttegro::Models::GenerateSecretKeyResponse, payload || {})
12
+ @http.post_model("/keys/generate", Inttegro::GenerateSecretKeyResponse, payload || {})
13
13
  end
14
14
 
15
15
  def page(payload = {})
16
- @http.post_model("/keys/page", Inttegro::Models::PageSecretKeysResponse, payload || {})
16
+ @http.post_model("/keys/page", Inttegro::PageSecretKeysResponse, payload || {})
17
17
  end
18
18
 
19
19
  def lookup(secret_key_id: nil, key_id: nil, id: nil)
20
20
  @http.post_model(
21
21
  "/keys/lookup",
22
- Inttegro::Models::LookupSecretKeyResponse,
22
+ Inttegro::LookupSecretKeyResponse,
23
23
  identifier_payload(secret_key_id, key_id, id)
24
24
  )
25
25
  end
26
26
 
27
27
  def update(payload)
28
- @http.post_model("/keys/update", Inttegro::Models::UpdateSecretKeyResponse, payload)
28
+ @http.post_model("/keys/update", Inttegro::UpdateSecretKeyResponse, payload)
29
29
  end
30
30
 
31
31
  def destroy(secret_key_id: nil, key_id: nil, id: nil)
32
32
  @http.post_model(
33
33
  "/keys/destroy",
34
- Inttegro::Models::DestroySecretKeyResponse,
34
+ Inttegro::DestroySecretKeyResponse,
35
35
  identifier_payload(secret_key_id, key_id, id)
36
36
  )
37
37
  end
@@ -39,7 +39,7 @@ module Inttegro
39
39
  def usage(secret_key_id: nil, key_id: nil, id: nil, **options)
40
40
  @http.post_model(
41
41
  "/keys/usage",
42
- Inttegro::Models::SecretKeyUsageResponse,
42
+ Inttegro::SecretKeyUsageResponse,
43
43
  identifier_payload(secret_key_id, key_id, id).merge(options)
44
44
  )
45
45
  end
@@ -11,7 +11,7 @@ module Inttegro
11
11
  def create(payload, idempotency_key: nil)
12
12
  @http.post_model(
13
13
  "/message_templates/create",
14
- Inttegro::Models::MessageTemplateEnvelope,
14
+ Inttegro::MessageTemplateEnvelope,
15
15
  payload,
16
16
  headers: idempotency_headers(idempotency_key)
17
17
  )
@@ -20,7 +20,7 @@ module Inttegro
20
20
  def update(payload, idempotency_key: nil)
21
21
  @http.post_model(
22
22
  "/message_templates/update",
23
- Inttegro::Models::MessageTemplateEnvelope,
23
+ Inttegro::MessageTemplateEnvelope,
24
24
  payload,
25
25
  headers: idempotency_headers(idempotency_key)
26
26
  )
@@ -29,7 +29,7 @@ module Inttegro
29
29
  def publish(template_id:, idempotency_key: nil)
30
30
  @http.post_model(
31
31
  "/message_templates/publish",
32
- Inttegro::Models::MessageTemplateEnvelope,
32
+ Inttegro::MessageTemplateEnvelope,
33
33
  { id: template_id },
34
34
  headers: idempotency_headers(idempotency_key)
35
35
  )
@@ -38,7 +38,7 @@ module Inttegro
38
38
  def archive(template_id:, idempotency_key: nil)
39
39
  @http.post_model(
40
40
  "/message_templates/archive",
41
- Inttegro::Models::MessageTemplateEnvelope,
41
+ Inttegro::MessageTemplateEnvelope,
42
42
  { id: template_id },
43
43
  headers: idempotency_headers(idempotency_key)
44
44
  )
@@ -47,7 +47,7 @@ module Inttegro
47
47
  def lookup(template_id:)
48
48
  @http.post_model(
49
49
  "/message_templates/lookup",
50
- Inttegro::Models::MessageTemplateEnvelope,
50
+ Inttegro::MessageTemplateEnvelope,
51
51
  { id: template_id }
52
52
  )
53
53
  end
@@ -55,7 +55,7 @@ module Inttegro
55
55
  def page(payload = {})
56
56
  @http.post_model(
57
57
  "/message_templates/page",
58
- Inttegro::Models::MessageTemplatesPageEnvelope,
58
+ Inttegro::MessageTemplatesPageEnvelope,
59
59
  payload || {}
60
60
  )
61
61
  end
@@ -63,7 +63,7 @@ module Inttegro
63
63
  def render_preview(payload)
64
64
  @http.post_model(
65
65
  "/message_templates/render_preview",
66
- Inttegro::Models::RenderMessageTemplatePreviewResponse,
66
+ Inttegro::RenderMessageTemplatePreviewResponse,
67
67
  payload
68
68
  )
69
69
  end