inttegro 7.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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -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/chime.rb +3 -2
  6. data/lib/inttegro/chime/send_request.rb +12 -2
  7. data/lib/inttegro/chime/send_request_cooldown.rb +35 -0
  8. data/lib/inttegro/chime/transport.rb +2 -1
  9. data/lib/inttegro/custom_data.rb +132 -0
  10. data/lib/inttegro/customer/create_request.rb +3 -2
  11. data/lib/inttegro/customer/customer.rb +3 -2
  12. data/lib/inttegro/customer/data.rb +3 -2
  13. data/lib/inttegro/customer/update_request.rb +3 -2
  14. data/lib/inttegro/file/file.rb +3 -2
  15. data/lib/inttegro/file_link/create_request.rb +3 -2
  16. data/lib/inttegro/file_link/file_link.rb +3 -2
  17. data/lib/inttegro/financial_account/bank_request.rb +3 -2
  18. data/lib/inttegro/financial_account/connected.rb +3 -2
  19. data/lib/inttegro/financial_account/created.rb +3 -2
  20. data/lib/inttegro/financial_account/details.rb +3 -2
  21. data/lib/inttegro/financial_account/dosh_request.rb +3 -2
  22. data/lib/inttegro/financial_account/financial_account.rb +3 -2
  23. data/lib/inttegro/financial_account/request_base.rb +3 -2
  24. data/lib/inttegro/financial_account/update_request.rb +3 -2
  25. data/lib/inttegro/financial_account/updated.rb +3 -2
  26. data/lib/inttegro/financial_account/wallet_request.rb +3 -2
  27. data/lib/inttegro/financial_account/wire_page_accounts_item.rb +3 -2
  28. data/lib/inttegro/generated/enums.rb +17 -1
  29. data/lib/inttegro/generated/models.rb +36 -0
  30. data/lib/inttegro/generated/operations.rb +18 -3
  31. data/lib/inttegro/http_client.rb +1 -1
  32. data/lib/inttegro/model_serialization.rb +30 -1
  33. data/lib/inttegro/order/create_existing_customer.rb +26 -2
  34. data/lib/inttegro/order/create_new_customer.rb +26 -2
  35. data/lib/inttegro/order/document_delivery_attempt.rb +7 -0
  36. data/lib/inttegro/order/document_delivery_channel_summary.rb +34 -0
  37. data/lib/inttegro/order/document_delivery_summary.rb +43 -0
  38. data/lib/inttegro/order/document_delivery_summary_channels.rb +36 -0
  39. data/lib/inttegro/order/invoice.rb +8 -0
  40. data/lib/inttegro/order/invoice_format.rb +3 -2
  41. data/lib/inttegro/order/line_item_group.rb +25 -0
  42. data/lib/inttegro/order/order.rb +3 -2
  43. data/lib/inttegro/order/product_line_item_product.rb +3 -2
  44. data/lib/inttegro/order/receipt_document_format.rb +35 -0
  45. data/lib/inttegro/order/update_request.rb +26 -2
  46. data/lib/inttegro/otp/initiate_request.rb +35 -8
  47. data/lib/inttegro/otp/purpose.rb +62 -0
  48. data/lib/inttegro/otp/transmission.rb +4 -4
  49. data/lib/inttegro/otp/transmission_status.rb +9 -0
  50. data/lib/inttegro/otp/verify_request.rb +2 -1
  51. data/lib/inttegro/payment_method/payment_method.rb +14 -2
  52. data/lib/inttegro/payment_method/tokenize_base.rb +3 -2
  53. data/lib/inttegro/payment_method/tokenize_mobile_money_request.rb +3 -2
  54. data/lib/inttegro/payment_method/update_request.rb +3 -2
  55. data/lib/inttegro/payout/payout.rb +3 -2
  56. data/lib/inttegro/price/embedded_product.rb +3 -2
  57. data/lib/inttegro/product/create_request.rb +3 -2
  58. data/lib/inttegro/product/inline_details.rb +3 -2
  59. data/lib/inttegro/product/product.rb +3 -2
  60. data/lib/inttegro/product/update_request.rb +3 -2
  61. data/lib/inttegro/product/updated.rb +3 -2
  62. data/lib/inttegro/purchase_intent/product.rb +3 -2
  63. data/lib/inttegro/refund/create_request.rb +3 -2
  64. data/lib/inttegro/refund/failure.rb +45 -0
  65. data/lib/inttegro/refund/failure_reason.rb +49 -0
  66. data/lib/inttegro/refund/line_item.rb +31 -1
  67. data/lib/inttegro/refund/offline_settlement.rb +28 -0
  68. data/lib/inttegro/{otp/transmission_sent_via.rb → refund/offline_settlement_type.rb} +6 -6
  69. data/lib/inttegro/refund/order_fee_line_item.rb +43 -0
  70. data/lib/inttegro/refund/order_fee_line_item_fee.rb +34 -0
  71. data/lib/inttegro/refund/order_fee_line_item_type.rb +25 -0
  72. data/lib/inttegro/refund/order_line_item.rb +20 -0
  73. data/lib/inttegro/refund/order_product_line_item.rb +50 -0
  74. data/lib/inttegro/refund/order_product_line_item_product.rb +34 -0
  75. data/lib/inttegro/refund/order_product_line_item_type.rb +25 -0
  76. data/lib/inttegro/refund/order_shipping_line_item.rb +43 -0
  77. data/lib/inttegro/refund/order_shipping_line_item_shipping.rb +34 -0
  78. data/lib/inttegro/refund/order_shipping_line_item_type.rb +25 -0
  79. data/lib/inttegro/refund/payment_method_settlement.rb +55 -0
  80. data/lib/inttegro/refund/payment_method_settlement_type.rb +24 -0
  81. data/lib/inttegro/refund/refund.rb +39 -2
  82. data/lib/inttegro/refund/settlement.rb +19 -0
  83. data/lib/inttegro/refund/settlement_bank_account_payment_method.rb +44 -0
  84. data/lib/inttegro/refund/settlement_bank_account_payment_method_bank_account.rb +37 -0
  85. data/lib/inttegro/refund/settlement_bank_account_payment_method_bank_account_ghana_bank_account.rb +35 -0
  86. data/lib/inttegro/refund/settlement_bank_account_payment_method_type.rb +25 -0
  87. data/lib/inttegro/refund/settlement_mobile_money_payment_method.rb +44 -0
  88. data/lib/inttegro/refund/settlement_mobile_money_payment_method_mobile_money.rb +43 -0
  89. data/lib/inttegro/refund/settlement_mobile_money_payment_method_type.rb +25 -0
  90. data/lib/inttegro/refund/settlement_payment_method.rb +19 -0
  91. data/lib/inttegro/resources/customers.rb +8 -0
  92. data/lib/inttegro/resources/financial_accounts.rb +12 -0
  93. data/lib/inttegro/resources/orders.rb +8 -0
  94. data/lib/inttegro/resources/payouts.rb +8 -0
  95. data/lib/inttegro/resources/products.rb +8 -0
  96. data/lib/inttegro/search/base.rb +17 -0
  97. data/lib/inttegro/search/facet.rb +34 -0
  98. data/lib/inttegro/search/facet_bucket.rb +34 -0
  99. data/lib/inttegro/search/facet_result.rb +35 -0
  100. data/lib/inttegro/search/filter.rb +42 -0
  101. data/lib/inttegro/search/filter_operator.rb +27 -0
  102. data/lib/inttegro/search/freshness.rb +43 -0
  103. data/lib/inttegro/search/freshness_state.rb +36 -0
  104. data/lib/inttegro/search/page.rb +104 -0
  105. data/lib/inttegro/search/request.rb +68 -0
  106. data/lib/inttegro/search/resource_freshness.rb +50 -0
  107. data/lib/inttegro/search/resource_freshness_state.rb +37 -0
  108. data/lib/inttegro/search/resource_reference.rb +35 -0
  109. data/lib/inttegro/search/resource_total.rb +43 -0
  110. data/lib/inttegro/search/resource_total_relation.rb +28 -0
  111. data/lib/inttegro/search/response.rb +28 -0
  112. data/lib/inttegro/search/result.rb +78 -0
  113. data/lib/inttegro/search/sort.rb +36 -0
  114. data/lib/inttegro/search/sort_direction.rb +27 -0
  115. data/lib/inttegro/search/sort_field.rb +30 -0
  116. data/lib/inttegro/search/total.rb +35 -0
  117. data/lib/inttegro/search/total_relation.rb +27 -0
  118. data/lib/inttegro/search/type.rb +36 -0
  119. data/lib/inttegro/shared/fee_details.rb +3 -2
  120. data/lib/inttegro/shared/invoice_settings.rb +3 -2
  121. data/lib/inttegro/shared/shipping_details.rb +3 -2
  122. data/lib/inttegro/telemetry.rb +1 -1
  123. data/lib/inttegro/upload_request/create_request.rb +3 -2
  124. data/lib/inttegro/upload_request/details.rb +3 -2
  125. data/lib/inttegro/upload_request/upload_request.rb +3 -2
  126. data/lib/inttegro/version.rb +1 -1
  127. data/lib/inttegro.rb +1 -0
  128. data/rbi/inttegro/generated.rbi +15 -0
  129. metadata +57 -3
@@ -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 "../custom_data"
7
8
  require_relative "attribute"
8
9
  require_relative "dimensions"
9
10
  require_relative "media"
@@ -103,7 +104,7 @@ module Inttegro
103
104
  # collection rather than a raw map.
104
105
  #
105
106
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
106
- # @return [Hash{String => String}, nil]
107
+ # @return [Inttegro::CustomData, nil]
107
108
  class UpdateRequest < T::Struct
108
109
  const :product_id, String
109
110
  const :type, T.nilable(Inttegro::Product::Type), default: nil
@@ -118,7 +119,7 @@ module Inttegro
118
119
  const :media, T.nilable(Inttegro::Product::Media), default: nil
119
120
  const :images, T.nilable(T::Array[String]), default: nil
120
121
  const :attributes, T.nilable(T::Array[Inttegro::Product::Attribute]), default: nil
121
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
122
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
122
123
  end
123
124
  end
124
125
  end
@@ -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 "../custom_data"
7
8
  require_relative "dimensions"
8
9
  require_relative "price_summary"
9
10
  require_relative "type"
@@ -71,7 +72,7 @@ module Inttegro
71
72
  # collection rather than a raw map.
72
73
  #
73
74
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
74
- # @return [Hash{String => String}, nil]
75
+ # @return [Inttegro::CustomData, nil]
75
76
  #
76
77
  # @!attribute [r] dimensions
77
78
  # At most one of `physical`, `digital`, or `custom`.
@@ -111,7 +112,7 @@ module Inttegro
111
112
  const :reference, T.nilable(String), default: nil
112
113
  const :tax_code, T.nilable(String), default: nil
113
114
  const :category, T.nilable(String), default: nil
114
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
115
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
115
116
  const :dimensions, T.nilable(Inttegro::Product::Dimensions), default: nil
116
117
  const :prices, T.nilable(T::Array[Inttegro::Product::PriceSummary]), default: nil
117
118
  const :unit_dim, T.nilable(String), default: nil
@@ -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 "../custom_data"
7
8
  require_relative "../product/dimensions"
8
9
  require_relative "../product/media"
9
10
  require_relative "../product/price_summary"
@@ -68,7 +69,7 @@ module Inttegro
68
69
  # collection rather than a raw map.
69
70
  #
70
71
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
71
- # @return [Hash{String => String}, nil]
72
+ # @return [Inttegro::CustomData, nil]
72
73
  #
73
74
  # @!attribute [r] description
74
75
  # Short description
@@ -155,7 +156,7 @@ module Inttegro
155
156
  const :attributes, T.nilable(T::Array[Inttegro::PurchaseIntent::ProductAttributesItem]), default: nil
156
157
  const :category, T.nilable(String), default: nil
157
158
  const :created_at, Time
158
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
159
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
159
160
  const :description, T.nilable(String), default: nil
160
161
  const :dimensions, T.nilable(Inttegro::Product::Dimensions), default: nil
161
162
  const :media, T.nilable(Inttegro::Product::Media), default: nil
@@ -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 "../custom_data"
7
8
  require_relative "create_line_item"
8
9
  require_relative "reason"
9
10
  require_relative "request_meta"
@@ -23,7 +24,7 @@ module Inttegro
23
24
  # collection rather than a raw map.
24
25
  #
25
26
  # Optional in the API payload; omitted values default to `nil`. Wire name: `custom_data`.
26
- # @return [Hash{String => String}, nil]
27
+ # @return [Inttegro::CustomData, nil]
27
28
  #
28
29
  # @!attribute [r] line_items
29
30
  # Value of the `line_items` field in the Inttegro API payload.
@@ -61,7 +62,7 @@ module Inttegro
61
62
  # Optional in the API payload; omitted values default to `nil`. Wire name: `request_meta`.
62
63
  # @return [Inttegro::Refund::RequestMeta, nil]
63
64
  class CreateRequest < T::Struct
64
- const :custom_data, T.nilable(T::Hash[String, String]), default: nil
65
+ const :custom_data, T.nilable(Inttegro::CustomData), default: nil
65
66
  const :line_items, T::Array[Inttegro::Refund::CreateLineItem]
66
67
  const :order_id, String
67
68
  const :reason, Inttegro::Refund::Reason
@@ -0,0 +1,45 @@
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 "failure_reason"
8
+
9
+ module Inttegro
10
+ class Refund
11
+ # Typed representation of the failure 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] detail
20
+ # Safe explanation intended for the merchant. Raw provider and internal diagnostic messages
21
+ # are never returned.
22
+ #
23
+ # Required in the API payload. Wire name: `detail`.
24
+ # @return [String]
25
+ #
26
+ # @!attribute [r] reason
27
+ # Stable, caller-safe reason that terminal refund processing failed. `unknown` is the
28
+ # fail-closed fallback for an unclassified internal failure.
29
+ #
30
+ # Required in the API payload. Wire name: `reason`.
31
+ # @return [Inttegro::Refund::FailureReason]
32
+ #
33
+ # @!attribute [r] retryable
34
+ # Whether the underlying condition may be resolved before creating a new, intentional refund
35
+ # request. It never instructs clients to repeat an uncertain money movement.
36
+ #
37
+ # Required in the API payload. Wire name: `retryable`.
38
+ # @return [Boolean]
39
+ class Failure < T::Struct
40
+ const :detail, String
41
+ const :reason, Inttegro::Refund::FailureReason
42
+ const :retryable, T::Boolean
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,49 @@
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
+ class Refund
10
+ # Stable, caller-safe reason that terminal refund processing failed. `unknown` is the
11
+ # fail-closed fallback for an unclassified internal failure.
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 FailureReason < T::Enum
18
+ enums do
19
+ # Serialized wire value: `insufficient_balance`.
20
+ # @return [Inttegro::Refund::FailureReason]
21
+ INSUFFICIENT_BALANCE = new("insufficient_balance")
22
+ # Serialized wire value: `original_payment_method_unavailable`.
23
+ # @return [Inttegro::Refund::FailureReason]
24
+ ORIGINAL_PAYMENT_METHOD_UNAVAILABLE = new("original_payment_method_unavailable")
25
+ # Serialized wire value: `original_payment_not_refundable`.
26
+ # @return [Inttegro::Refund::FailureReason]
27
+ ORIGINAL_PAYMENT_NOT_REFUNDABLE = new("original_payment_not_refundable")
28
+ # Serialized wire value: `refund_not_supported`.
29
+ # @return [Inttegro::Refund::FailureReason]
30
+ REFUND_NOT_SUPPORTED = new("refund_not_supported")
31
+ # Serialized wire value: `amount_not_supported`.
32
+ # @return [Inttegro::Refund::FailureReason]
33
+ AMOUNT_NOT_SUPPORTED = new("amount_not_supported")
34
+ # Serialized wire value: `refund_declined`.
35
+ # @return [Inttegro::Refund::FailureReason]
36
+ REFUND_DECLINED = new("refund_declined")
37
+ # Serialized wire value: `refund_not_permitted`.
38
+ # @return [Inttegro::Refund::FailureReason]
39
+ REFUND_NOT_PERMITTED = new("refund_not_permitted")
40
+ # Serialized wire value: `temporarily_unavailable`.
41
+ # @return [Inttegro::Refund::FailureReason]
42
+ TEMPORARILY_UNAVAILABLE = new("temporarily_unavailable")
43
+ # Serialized wire value: `unknown`.
44
+ # @return [Inttegro::Refund::FailureReason]
45
+ UNKNOWN = new("unknown")
46
+ end
47
+ end
48
+ end
49
+ end
@@ -5,6 +5,7 @@
5
5
 
6
6
  require_relative "base"
7
7
  require_relative "../money/amount"
8
+ require_relative "order_line_item"
8
9
  require_relative "reason"
9
10
 
10
11
  module Inttegro
@@ -24,11 +25,19 @@ module Inttegro
24
25
  # @return [String]
25
26
  #
26
27
  # @!attribute [r] order_line_item_id
27
- # Value of the `order_line_item_id` field in the Inttegro API payload.
28
+ # Deprecated compatibility identifier. Use `order_line_item.id` when `order_line_item` is
29
+ # present.
28
30
  #
29
31
  # Required in the API payload. Wire name: `order_line_item_id`.
30
32
  # @return [String]
31
33
  #
34
+ # @!attribute [r] order_line_item
35
+ # Immutable display snapshot of the refunded order line. Omitted when the originating order
36
+ # cannot be resolved.
37
+ #
38
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `order_line_item`.
39
+ # @return [Inttegro::Refund::OrderLineItem, nil]
40
+ #
32
41
  # @!attribute [r] original_amount_paid
33
42
  # Value of the `original_amount_paid` field in the Inttegro API payload.
34
43
  #
@@ -55,10 +64,31 @@ module Inttegro
55
64
  class LineItem < T::Struct
56
65
  const :id, String
57
66
  const :order_line_item_id, String
67
+ const :order_line_item, T.nilable(Inttegro::Refund::OrderLineItem), default: nil
58
68
  const :original_amount_paid, Inttegro::Money::Amount
59
69
  const :reason, T.nilable(Inttegro::Refund::Reason), default: nil
60
70
  const :reason_details, T.nilable(String), default: nil
61
71
  const :refund_amount, Inttegro::Money::Amount
72
+
73
+ extend T::Sig
74
+
75
+ sig { params(hash: T::Hash[String, Object], strict: T::Boolean).returns(T.attached_class) }
76
+ def self.from_hash(hash, strict = false)
77
+ data = hash.dup
78
+ if (order_line_item_value = data["order_line_item"]).is_a?(Hash)
79
+ data["order_line_item"] = case order_line_item_value["type"]
80
+ when "product"
81
+ Inttegro::Refund::OrderProductLineItem.from_hash(order_line_item_value)
82
+ when "fee"
83
+ Inttegro::Refund::OrderFeeLineItem.from_hash(order_line_item_value)
84
+ when "shipping"
85
+ Inttegro::Refund::OrderShippingLineItem.from_hash(order_line_item_value)
86
+ else
87
+ order_line_item_value
88
+ end
89
+ end
90
+ super(data, strict)
91
+ end
62
92
  end
63
93
  end
64
94
  end
@@ -0,0 +1,28 @@
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 "offline_settlement_type"
8
+
9
+ module Inttegro
10
+ class Refund
11
+ # Typed representation of the offline settlement 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
+ # The order was paid offline, so no Inttegro payment method is attached.
21
+ #
22
+ # Required in the API payload. Wire name: `type`.
23
+ # @return [Inttegro::Refund::OfflineSettlementType]
24
+ class OfflineSettlement < T::Struct
25
+ const :type, Inttegro::Refund::OfflineSettlementType
26
+ end
27
+ end
28
+ end
@@ -6,18 +6,18 @@
6
6
  require_relative "base"
7
7
 
8
8
  module Inttegro
9
- module OTP
10
- # String-backed values accepted by the Inttegro API for Inttegro::OTP::TransmissionSentVia.
9
+ class Refund
10
+ # The order was paid offline, so no Inttegro payment method is attached.
11
11
  #
12
12
  # Use the constants below when constructing a request. `#serialize` returns the documented
13
13
  # string wire value received from or sent to the API.
14
14
  #
15
15
  # @api public
16
- class TransmissionSentVia < T::Enum
16
+ class OfflineSettlementType < T::Enum
17
17
  enums do
18
- # Serialized wire value: `sms`.
19
- # @return [Inttegro::OTP::TransmissionSentVia]
20
- SMS = new("sms")
18
+ # Serialized wire value: `offline`.
19
+ # @return [Inttegro::Refund::OfflineSettlementType]
20
+ OFFLINE = new("offline")
21
21
  end
22
22
  end
23
23
  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 "order_fee_line_item_fee"
8
+ require_relative "order_fee_line_item_type"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Typed representation of the order fee line item 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] id
21
+ # Immutable order-line identifier with the `oli_` prefix.
22
+ #
23
+ # Required in the API payload. Wire name: `id`.
24
+ # @return [String]
25
+ #
26
+ # @!attribute [r] type
27
+ # Value of the `type` field in the Inttegro API payload.
28
+ #
29
+ # Required in the API payload. Wire name: `type`.
30
+ # @return [Inttegro::Refund::OrderFeeLineItemType]
31
+ #
32
+ # @!attribute [r] fee
33
+ # Value of the `fee` field in the Inttegro API payload.
34
+ #
35
+ # Required in the API payload. Wire name: `fee`.
36
+ # @return [Inttegro::Refund::OrderFeeLineItemFee]
37
+ class OrderFeeLineItem < T::Struct
38
+ const :id, String
39
+ const :type, Inttegro::Refund::OrderFeeLineItemType
40
+ const :fee, Inttegro::Refund::OrderFeeLineItemFee
41
+ end
42
+ end
43
+ 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
+ class Refund
10
+ # Typed representation of the order fee line item fee 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] label
19
+ # Value of the `label` field in the Inttegro API payload.
20
+ #
21
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `label`.
22
+ # @return [String, nil]
23
+ #
24
+ # @!attribute [r] description
25
+ # Value of the `description` field in the Inttegro API payload.
26
+ #
27
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `description`.
28
+ # @return [String, nil]
29
+ class OrderFeeLineItemFee < T::Struct
30
+ const :label, T.nilable(String), default: nil
31
+ const :description, T.nilable(String), default: nil
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,25 @@
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
+ class Refund
10
+ # String-backed values accepted by the Inttegro API for
11
+ # Inttegro::Refund::OrderFeeLineItemType.
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 OrderFeeLineItemType < T::Enum
18
+ enums do
19
+ # Serialized wire value: `fee`.
20
+ # @return [Inttegro::Refund::OrderFeeLineItemType]
21
+ FEE = new("fee")
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,20 @@
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 "order_fee_line_item"
8
+ require_relative "order_product_line_item"
9
+ require_relative "order_shipping_line_item"
10
+
11
+ module Inttegro
12
+ class Refund
13
+ # Immutable display snapshot of the refunded order line. Omitted when the originating order
14
+ # cannot be resolved.
15
+ #
16
+ # @api public
17
+ # @return [Inttegro::Refund::OrderProductLineItem, Inttegro::Refund::OrderFeeLineItem, Inttegro::Refund::OrderShippingLineItem]
18
+ OrderLineItem = T.type_alias { T.any(Inttegro::Refund::OrderProductLineItem, Inttegro::Refund::OrderFeeLineItem, Inttegro::Refund::OrderShippingLineItem) }
19
+ end
20
+ 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 "order_product_line_item_product"
8
+ require_relative "order_product_line_item_type"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Typed representation of the order product line item 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] id
21
+ # Immutable order-line identifier with the `oli_` prefix.
22
+ #
23
+ # Required in the API payload. Wire name: `id`.
24
+ # @return [String]
25
+ #
26
+ # @!attribute [r] type
27
+ # Value of the `type` field in the Inttegro API payload.
28
+ #
29
+ # Required in the API payload. Wire name: `type`.
30
+ # @return [Inttegro::Refund::OrderProductLineItemType]
31
+ #
32
+ # @!attribute [r] quantity
33
+ # Value of the `quantity` field in the Inttegro API payload.
34
+ #
35
+ # Required in the API payload. Wire name: `quantity`.
36
+ # @return [Integer]
37
+ #
38
+ # @!attribute [r] product
39
+ # Value of the `product` field in the Inttegro API payload.
40
+ #
41
+ # Required in the API payload. Wire name: `product`.
42
+ # @return [Inttegro::Refund::OrderProductLineItemProduct]
43
+ class OrderProductLineItem < T::Struct
44
+ const :id, String
45
+ const :type, Inttegro::Refund::OrderProductLineItemType
46
+ const :quantity, Integer
47
+ const :product, Inttegro::Refund::OrderProductLineItemProduct
48
+ end
49
+ end
50
+ 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
+ class Refund
10
+ # Typed representation of the order product line item product 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] id
19
+ # Source catalog product identifier. Omitted for inline products.
20
+ #
21
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `id`.
22
+ # @return [String, nil]
23
+ #
24
+ # @!attribute [r] name
25
+ # Product name captured on the order.
26
+ #
27
+ # Required in the API payload. Wire name: `name`.
28
+ # @return [String]
29
+ class OrderProductLineItemProduct < T::Struct
30
+ const :id, T.nilable(String), default: nil
31
+ const :name, String
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,25 @@
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
+ class Refund
10
+ # String-backed values accepted by the Inttegro API for
11
+ # Inttegro::Refund::OrderProductLineItemType.
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 OrderProductLineItemType < T::Enum
18
+ enums do
19
+ # Serialized wire value: `product`.
20
+ # @return [Inttegro::Refund::OrderProductLineItemType]
21
+ PRODUCT = new("product")
22
+ end
23
+ end
24
+ end
25
+ 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 "order_shipping_line_item_shipping"
8
+ require_relative "order_shipping_line_item_type"
9
+
10
+ module Inttegro
11
+ class Refund
12
+ # Typed representation of the order shipping line item 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] id
21
+ # Immutable order-line identifier with the `oli_` prefix.
22
+ #
23
+ # Required in the API payload. Wire name: `id`.
24
+ # @return [String]
25
+ #
26
+ # @!attribute [r] type
27
+ # Value of the `type` field in the Inttegro API payload.
28
+ #
29
+ # Required in the API payload. Wire name: `type`.
30
+ # @return [Inttegro::Refund::OrderShippingLineItemType]
31
+ #
32
+ # @!attribute [r] shipping
33
+ # Value of the `shipping` field in the Inttegro API payload.
34
+ #
35
+ # Required in the API payload. Wire name: `shipping`.
36
+ # @return [Inttegro::Refund::OrderShippingLineItemShipping]
37
+ class OrderShippingLineItem < T::Struct
38
+ const :id, String
39
+ const :type, Inttegro::Refund::OrderShippingLineItemType
40
+ const :shipping, Inttegro::Refund::OrderShippingLineItemShipping
41
+ end
42
+ end
43
+ 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
+ class Refund
10
+ # Typed representation of the order shipping line item shipping 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] label
19
+ # Value of the `label` field in the Inttegro API payload.
20
+ #
21
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `label`.
22
+ # @return [String, nil]
23
+ #
24
+ # @!attribute [r] description
25
+ # Value of the `description` field in the Inttegro API payload.
26
+ #
27
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `description`.
28
+ # @return [String, nil]
29
+ class OrderShippingLineItemShipping < T::Struct
30
+ const :label, T.nilable(String), default: nil
31
+ const :description, T.nilable(String), default: nil
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,25 @@
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
+ class Refund
10
+ # String-backed values accepted by the Inttegro API for
11
+ # Inttegro::Refund::OrderShippingLineItemType.
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 OrderShippingLineItemType < T::Enum
18
+ enums do
19
+ # Serialized wire value: `shipping`.
20
+ # @return [Inttegro::Refund::OrderShippingLineItemType]
21
+ SHIPPING = new("shipping")
22
+ end
23
+ end
24
+ end
25
+ end