inttegro 11.0.0 → 12.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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/lib/inttegro/app/application.rb +18 -0
  4. data/lib/inttegro/app/create_request.rb +9 -0
  5. data/lib/inttegro/app/looked_up.rb +18 -0
  6. data/lib/inttegro/app/operating_policy.rb +36 -0
  7. data/lib/inttegro/app/update_request.rb +9 -0
  8. data/lib/inttegro/app/updated.rb +18 -0
  9. data/lib/inttegro/balance_transaction/balance_transaction.rb +4 -3
  10. data/lib/inttegro/broadcast/request.rb +5 -3
  11. data/lib/inttegro/checkout/customer_data.rb +41 -0
  12. data/lib/inttegro/checkout/lookup_request.rb +3 -3
  13. data/lib/inttegro/checkout/{lookup_request_variant2.rb → lookup_resource_request_variant2.rb} +2 -2
  14. data/lib/inttegro/checkout/lookup_response.rb +8 -17
  15. data/lib/inttegro/checkout/order_line_item_group.rb +5 -3
  16. data/lib/inttegro/checkout/pay_request.rb +40 -3
  17. data/lib/inttegro/checkout/pay_request_selected_amount.rb +36 -0
  18. data/lib/inttegro/checkout/select_amount_request_variant2.rb +6 -6
  19. data/lib/inttegro/checkout/select_amount_request_variant2_line_items_item.rb +36 -0
  20. data/lib/inttegro/chime/inline_recipient.rb +4 -4
  21. data/lib/inttegro/chime/recipient.rb +4 -3
  22. data/lib/inttegro/chime/send_request.rb +5 -3
  23. data/lib/inttegro/chime/{inline_recipient_variant1.rb → send_request_recipient_variant1_variant1.rb} +9 -8
  24. data/lib/inttegro/chime/{inline_recipient_variant1_phone.rb → send_request_recipient_variant1_variant1_phone.rb} +3 -2
  25. data/lib/inttegro/chime/{inline_recipient_variant1_type.rb → send_request_recipient_variant1_variant1_type.rb} +3 -3
  26. data/lib/inttegro/chime/{inline_recipient_variant2.rb → send_request_recipient_variant1_variant2.rb} +9 -8
  27. data/lib/inttegro/chime/{inline_recipient_variant2_email.rb → send_request_recipient_variant1_variant2_email.rb} +3 -2
  28. data/lib/inttegro/chime/{inline_recipient_variant2_type.rb → send_request_recipient_variant1_variant2_type.rb} +3 -3
  29. data/lib/inttegro/client.rb +10 -0
  30. data/lib/inttegro/financial_account/connected.rb +9 -0
  31. data/lib/inttegro/financial_account/created.rb +9 -0
  32. data/lib/inttegro/financial_account/details.rb +9 -0
  33. data/lib/inttegro/financial_account/financial_account.rb +9 -0
  34. data/lib/inttegro/financial_account/name_enquiry.rb +42 -0
  35. data/lib/inttegro/financial_account/updated.rb +9 -0
  36. data/lib/inttegro/generated/enums.rb +5 -2
  37. data/lib/inttegro/generated/models.rb +77 -31
  38. data/lib/inttegro/generated/operations.rb +26 -8
  39. data/lib/inttegro/message_template/create_email_request.rb +2 -3
  40. data/lib/inttegro/message_template/email_content.rb +6 -3
  41. data/lib/inttegro/message_template/email_content_from.rb +36 -0
  42. data/lib/inttegro/message_template/message_template.rb +2 -3
  43. data/lib/inttegro/message_template/rendered.rb +2 -3
  44. data/lib/inttegro/message_template/update_request.rb +2 -3
  45. data/lib/inttegro/order/create_existing_customer.rb +5 -3
  46. data/lib/inttegro/order/create_new_customer.rb +5 -3
  47. data/lib/inttegro/order/line_item_group.rb +6 -3
  48. data/lib/inttegro/order/update_request.rb +5 -3
  49. data/lib/inttegro/payment/children_policy_capabilities.rb +35 -0
  50. data/lib/inttegro/payment/operating_policy_capabilities.rb +35 -0
  51. data/lib/inttegro/payment/operating_policy_capabilities_input.rb +35 -0
  52. data/lib/inttegro/payment_method/children_policy_payment_method_capabilities.rb +35 -0
  53. data/lib/inttegro/payment_method/children_policy_payment_methods_capabilities.rb +50 -0
  54. data/lib/inttegro/payment_method/operating_policy_payment_method_capabilities.rb +35 -0
  55. data/lib/inttegro/payment_method/operating_policy_payment_methods_capabilities.rb +50 -0
  56. data/lib/inttegro/payout/amount_limits.rb +9 -7
  57. data/lib/inttegro/payout/children_policy_capabilities.rb +43 -0
  58. data/lib/inttegro/payout/limit_value.rb +28 -0
  59. data/lib/inttegro/payout/operating_policy_capabilities.rb +43 -0
  60. data/lib/inttegro/payout/operating_policy_capabilities_input.rb +43 -0
  61. data/lib/inttegro/payout/settings_limits.rb +3 -3
  62. data/lib/inttegro/payout/settings_lookup_schedule_aging_spec.rb +7 -0
  63. data/lib/inttegro/payout/settings_mutation_schedule_spec.rb +4 -4
  64. data/lib/inttegro/product/line_item.rb +6 -3
  65. data/lib/inttegro/product/media.rb +8 -7
  66. data/lib/inttegro/product/update_request.rb +1 -1
  67. data/lib/inttegro/purchase_intent/merchant.rb +14 -19
  68. data/lib/inttegro/purchase_intent/merchant_asset.rb +34 -0
  69. data/lib/inttegro/purchase_intent/merchant_branding.rb +50 -0
  70. data/lib/inttegro/purchase_intent/merchant_color_scheme.rb +76 -0
  71. data/lib/inttegro/purchase_intent/merchant_profile.rb +42 -0
  72. data/lib/inttegro/purchase_intent/merchant_support.rb +34 -0
  73. data/lib/inttegro/purchase_intent/purchase_intent.rb +10 -2
  74. data/lib/inttegro/refund/line_item.rb +5 -3
  75. data/lib/inttegro/refund/payment_method_settlement.rb +4 -3
  76. data/lib/inttegro/refund/refund.rb +4 -3
  77. data/lib/inttegro/resources/children_policies.rb +61 -0
  78. data/lib/inttegro/resources/operating_policies.rb +88 -0
  79. data/lib/inttegro/schedule/chime_request.rb +5 -3
  80. data/lib/inttegro/shared/children_policy.rb +84 -0
  81. data/lib/inttegro/shared/children_policy_capabilities.rb +44 -0
  82. data/lib/inttegro/shared/children_policy_response.rb +28 -0
  83. data/lib/inttegro/shared/children_policy_versions_page.rb +63 -0
  84. data/lib/inttegro/shared/children_policy_versions_page_response.rb +29 -0
  85. data/lib/inttegro/shared/create_operating_policy_request.rb +42 -0
  86. data/lib/inttegro/shared/inline_operating_policy_selection.rb +28 -0
  87. data/lib/inttegro/shared/lookup_children_policy_request.rb +27 -0
  88. data/lib/inttegro/shared/lookup_operating_policy_request.rb +34 -0
  89. data/lib/inttegro/shared/operating_policy.rb +98 -0
  90. data/lib/inttegro/shared/operating_policy_capabilities.rb +44 -0
  91. data/lib/inttegro/shared/operating_policy_capabilities_input.rb +44 -0
  92. data/lib/inttegro/shared/operating_policy_response.rb +28 -0
  93. data/lib/inttegro/shared/operating_policy_selection.rb +18 -0
  94. data/lib/inttegro/shared/operating_policy_selection_by_id.rb +27 -0
  95. data/lib/inttegro/shared/operating_policy_source.rb +42 -0
  96. data/lib/inttegro/shared/operating_policy_source_type.rb +28 -0
  97. data/lib/inttegro/shared/operating_policy_versions_page.rb +63 -0
  98. data/lib/inttegro/shared/operating_policy_versions_page_response.rb +29 -0
  99. data/lib/inttegro/shared/page_children_policy_versions_request.rb +35 -0
  100. data/lib/inttegro/shared/page_operating_policy_versions_request.rb +42 -0
  101. data/lib/inttegro/shared/policy_amount_range.rb +34 -0
  102. data/lib/inttegro/shared/policy_bt_aging_spec.rb +35 -0
  103. data/lib/inttegro/shared/policy_bt_aging_spec_id.rb +33 -0
  104. data/lib/inttegro/shared/policy_bt_aging_spec_reference.rb +28 -0
  105. data/lib/inttegro/shared/policy_bt_aging_spec_reference_id.rb +33 -0
  106. data/lib/inttegro/shared/policy_limits.rb +28 -0
  107. data/lib/inttegro/shared/update_operating_policy_request.rb +56 -0
  108. data/lib/inttegro/version.rb +1 -1
  109. data/rbi/inttegro/generated.rbi +45 -4
  110. metadata +61 -10
  111. data/lib/inttegro/checkout/amount_selection.rb +0 -84
@@ -16,43 +16,44 @@ module Inttegro
16
16
  # @api public
17
17
  #
18
18
  # @!attribute [r] hero_image
19
- # Value of the `hero_image` field in the Inttegro API payload.
19
+ # An Inttegro Files API file or file-link reference. Remote URLs are not accepted.
20
20
  #
21
21
  # Optional in the API payload; omitted values default to `nil`. Wire name: `hero_image`.
22
22
  # @return [String, nil]
23
23
  #
24
24
  # @!attribute [r] thumbnail
25
- # Value of the `thumbnail` field in the Inttegro API payload.
25
+ # An Inttegro Files API file or file-link reference. Remote URLs are not accepted.
26
26
  #
27
27
  # Optional in the API payload; omitted values default to `nil`. Wire name: `thumbnail`.
28
28
  # @return [String, nil]
29
29
  #
30
30
  # @!attribute [r] web_page_url
31
- # Value of the `web_page_url` field in the Inttegro API payload.
31
+ # Public HTTP or HTTPS URL for the product's canonical landing page. Credentials and local or
32
+ # private literal addresses are rejected.
32
33
  #
33
34
  # Optional in the API payload; omitted values default to `nil`. Wire name: `web_page_url`.
34
35
  # @return [String, nil]
35
36
  #
36
37
  # @!attribute [r] brand_logo
37
- # Value of the `brand_logo` field in the Inttegro API payload.
38
+ # An Inttegro Files API file or file-link reference. Remote URLs are not accepted.
38
39
  #
39
40
  # Optional in the API payload; omitted values default to `nil`. Wire name: `brand_logo`.
40
41
  # @return [String, nil]
41
42
  #
42
43
  # @!attribute [r] infographic
43
- # Value of the `infographic` field in the Inttegro API payload.
44
+ # An Inttegro Files API file or file-link reference. Remote URLs are not accepted.
44
45
  #
45
46
  # Optional in the API payload; omitted values default to `nil`. Wire name: `infographic`.
46
47
  # @return [String, nil]
47
48
  #
48
49
  # @!attribute [r] promo_video
49
- # Value of the `promo_video` field in the Inttegro API payload.
50
+ # An Inttegro Files API file or file-link reference. Remote URLs are not accepted.
50
51
  #
51
52
  # Optional in the API payload; omitted values default to `nil`. Wire name: `promo_video`.
52
53
  # @return [String, nil]
53
54
  #
54
55
  # @!attribute [r] demo_video
55
- # Value of the `demo_video` field in the Inttegro API payload.
56
+ # An Inttegro Files API file or file-link reference. Remote URLs are not accepted.
56
57
  #
57
58
  # Optional in the API payload; omitted values default to `nil`. Wire name: `demo_video`.
58
59
  # @return [String, nil]
@@ -88,7 +88,7 @@ module Inttegro
88
88
  # @return [Inttegro::Product::Media, nil]
89
89
  #
90
90
  # @!attribute [r] images
91
- # Legacy image list. Mutually exclusive with `media`.
91
+ # Legacy image list of Inttegro file or file-link references. Mutually exclusive with `media`.
92
92
  #
93
93
  # Optional in the API payload; omitted values default to `nil`. Wire name: `images`.
94
94
  # @return [Array<String>, nil]
@@ -4,11 +4,13 @@
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 "merchant_branding"
8
+ require_relative "merchant_profile"
7
9
 
8
10
  module Inttegro
9
11
  class PurchaseIntent
10
- # Merchant identity captured for the hosted checkout. Individual fields are omitted when
11
- # unavailable.
12
+ # Current public merchant presentation resolved from the purchase intent's application. It is
13
+ # hydrated at lookup time and is not stored on the purchase intent.
12
14
  #
13
15
  # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
14
16
  # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
@@ -16,27 +18,20 @@ module Inttegro
16
18
  #
17
19
  # @api public
18
20
  #
19
- # @!attribute [r] app_name
20
- # Value of the `app_name` field in the Inttegro API payload.
21
+ # @!attribute [r] branding
22
+ # Value of the `branding` field in the Inttegro API payload.
21
23
  #
22
- # Optional in the API payload; omitted values default to `nil`. Wire name: `app_name`.
23
- # @return [String, nil]
24
+ # Required in the API payload. Wire name: `branding`.
25
+ # @return [Inttegro::PurchaseIntent::MerchantBranding]
24
26
  #
25
- # @!attribute [r] organization_id
26
- # Value of the `organization_id` field in the Inttegro API payload.
27
+ # @!attribute [r] profile
28
+ # Value of the `profile` field in the Inttegro API payload.
27
29
  #
28
- # Optional in the API payload; omitted values default to `nil`. Wire name: `organization_id`.
29
- # @return [String, nil]
30
- #
31
- # @!attribute [r] organization_name
32
- # Value of the `organization_name` field in the Inttegro API payload.
33
- #
34
- # Optional in the API payload; omitted values default to `nil`. Wire name: `organization_name`.
35
- # @return [String, nil]
30
+ # Required in the API payload. Wire name: `profile`.
31
+ # @return [Inttegro::PurchaseIntent::MerchantProfile]
36
32
  class Merchant < T::Struct
37
- const :app_name, T.nilable(String), default: nil
38
- const :organization_id, T.nilable(String), default: nil
39
- const :organization_name, T.nilable(String), default: nil
33
+ const :branding, Inttegro::PurchaseIntent::MerchantBranding
34
+ const :profile, Inttegro::PurchaseIntent::MerchantProfile
40
35
  end
41
36
  end
42
37
  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 PurchaseIntent
10
+ # Typed representation of the merchant asset 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] alt_text
19
+ # Accessible description of the merchant asset
20
+ #
21
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `alt_text`.
22
+ # @return [String, nil]
23
+ #
24
+ # @!attribute [r] url
25
+ # Public URL of the merchant asset
26
+ #
27
+ # Required in the API payload. Wire name: `url`.
28
+ # @return [String]
29
+ class MerchantAsset < T::Struct
30
+ const :alt_text, T.nilable(String), default: nil
31
+ const :url, String
32
+ end
33
+ end
34
+ 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 "merchant_asset"
8
+ require_relative "merchant_color_scheme"
9
+
10
+ module Inttegro
11
+ class PurchaseIntent
12
+ # Typed representation of the merchant branding 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] accent_color
21
+ # Merchant accent color as a normalized six-digit hexadecimal value
22
+ #
23
+ # Required in the API payload. Wire name: `accent_color`.
24
+ # @return [String]
25
+ #
26
+ # @!attribute [r] color_scheme
27
+ # Value of the `color_scheme` field in the Inttegro API payload.
28
+ #
29
+ # Required in the API payload. Wire name: `color_scheme`.
30
+ # @return [Inttegro::PurchaseIntent::MerchantColorScheme]
31
+ #
32
+ # @!attribute [r] icon
33
+ # Value of the `icon` field in the Inttegro API payload.
34
+ #
35
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `icon`.
36
+ # @return [Inttegro::PurchaseIntent::MerchantAsset, nil]
37
+ #
38
+ # @!attribute [r] logo
39
+ # Value of the `logo` field in the Inttegro API payload.
40
+ #
41
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `logo`.
42
+ # @return [Inttegro::PurchaseIntent::MerchantAsset, nil]
43
+ class MerchantBranding < T::Struct
44
+ const :accent_color, String
45
+ const :color_scheme, Inttegro::PurchaseIntent::MerchantColorScheme
46
+ const :icon, T.nilable(Inttegro::PurchaseIntent::MerchantAsset), default: nil
47
+ const :logo, T.nilable(Inttegro::PurchaseIntent::MerchantAsset), default: nil
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,76 @@
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 PurchaseIntent
10
+ # Typed representation of the merchant color scheme 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] border
19
+ # Value of the `border` field in the Inttegro API payload.
20
+ #
21
+ # Required in the API payload. Wire name: `border`.
22
+ # @return [String]
23
+ #
24
+ # @!attribute [r] link
25
+ # Value of the `link` field in the Inttegro API payload.
26
+ #
27
+ # Required in the API payload. Wire name: `link`.
28
+ # @return [String]
29
+ #
30
+ # @!attribute [r] muted_text
31
+ # Value of the `muted_text` field in the Inttegro API payload.
32
+ #
33
+ # Required in the API payload. Wire name: `muted_text`.
34
+ # @return [String]
35
+ #
36
+ # @!attribute [r] primary
37
+ # Value of the `primary` field in the Inttegro API payload.
38
+ #
39
+ # Required in the API payload. Wire name: `primary`.
40
+ # @return [String]
41
+ #
42
+ # @!attribute [r] primary_foreground
43
+ # Value of the `primary_foreground` field in the Inttegro API payload.
44
+ #
45
+ # Required in the API payload. Wire name: `primary_foreground`.
46
+ # @return [String]
47
+ #
48
+ # @!attribute [r] surface
49
+ # Value of the `surface` field in the Inttegro API payload.
50
+ #
51
+ # Required in the API payload. Wire name: `surface`.
52
+ # @return [String]
53
+ #
54
+ # @!attribute [r] surface_muted
55
+ # Value of the `surface_muted` field in the Inttegro API payload.
56
+ #
57
+ # Required in the API payload. Wire name: `surface_muted`.
58
+ # @return [String]
59
+ #
60
+ # @!attribute [r] text
61
+ # Value of the `text` field in the Inttegro API payload.
62
+ #
63
+ # Required in the API payload. Wire name: `text`.
64
+ # @return [String]
65
+ class MerchantColorScheme < T::Struct
66
+ const :border, String
67
+ const :link, String
68
+ const :muted_text, String
69
+ const :primary, String
70
+ const :primary_foreground, String
71
+ const :surface, String
72
+ const :surface_muted, String
73
+ const :text, String
74
+ end
75
+ end
76
+ 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 "merchant_support"
8
+
9
+ module Inttegro
10
+ class PurchaseIntent
11
+ # Typed representation of the merchant profile 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] name
20
+ # Current public application alias, falling back to its current application name
21
+ #
22
+ # Required in the API payload. Wire name: `name`.
23
+ # @return [String]
24
+ #
25
+ # @!attribute [r] support
26
+ # Value of the `support` field in the Inttegro API payload.
27
+ #
28
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `support`.
29
+ # @return [Inttegro::PurchaseIntent::MerchantSupport, nil]
30
+ #
31
+ # @!attribute [r] website_url
32
+ # Public merchant website URL
33
+ #
34
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `website_url`.
35
+ # @return [String, nil]
36
+ class MerchantProfile < T::Struct
37
+ const :name, String
38
+ const :support, T.nilable(Inttegro::PurchaseIntent::MerchantSupport), default: nil
39
+ const :website_url, T.nilable(String), default: nil
40
+ end
41
+ end
42
+ 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 PurchaseIntent
10
+ # Typed representation of the merchant support 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] email
19
+ # Public merchant support email address
20
+ #
21
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `email`.
22
+ # @return [String, nil]
23
+ #
24
+ # @!attribute [r] phone
25
+ # Public merchant support phone number
26
+ #
27
+ # Optional in the API payload; omitted values default to `nil`. Wire name: `phone`.
28
+ # @return [String, nil]
29
+ class MerchantSupport < T::Struct
30
+ const :email, T.nilable(String), default: nil
31
+ const :phone, T.nilable(String), default: nil
32
+ end
33
+ end
34
+ end
@@ -28,6 +28,13 @@ module Inttegro
28
28
  # Required in the API payload. Wire name: `allow_variants`.
29
29
  # @return [Boolean]
30
30
  #
31
+ # @!attribute [r] application_id
32
+ # Application that owns the purchase intent. This is routing metadata, not merchant
33
+ # presentation.
34
+ #
35
+ # Required in the API payload. Wire name: `application_id`.
36
+ # @return [String]
37
+ #
31
38
  # @!attribute [r] created_at
32
39
  # Creation timestamp
33
40
  #
@@ -54,8 +61,8 @@ module Inttegro
54
61
  # @return [Time, nil]
55
62
  #
56
63
  # @!attribute [r] merchant
57
- # Merchant identity captured for the hosted checkout. Individual fields are omitted when
58
- # unavailable.
64
+ # Current public merchant presentation resolved from the purchase intent's application. It is
65
+ # hydrated at lookup time and is not stored on the purchase intent.
59
66
  #
60
67
  # Optional in the API payload; omitted values default to `nil`. Wire name: `merchant`.
61
68
  # @return [Inttegro::PurchaseIntent::Merchant, nil]
@@ -111,6 +118,7 @@ module Inttegro
111
118
  # @return [Inttegro::PurchaseIntent::VariantSet, nil]
112
119
  class PurchaseIntent
113
120
  const :allow_variants, T::Boolean
121
+ const :application_id, String
114
122
  const :created_at, Time
115
123
  const :expires_at, T.nilable(Time), default: nil
116
124
  const :id, String
@@ -5,7 +5,9 @@
5
5
 
6
6
  require_relative "base"
7
7
  require_relative "../money/amount"
8
- require_relative "order_line_item"
8
+ require_relative "order_fee_line_item"
9
+ require_relative "order_product_line_item"
10
+ require_relative "order_shipping_line_item"
9
11
  require_relative "reason"
10
12
 
11
13
  module Inttegro
@@ -36,7 +38,7 @@ module Inttegro
36
38
  # cannot be resolved.
37
39
  #
38
40
  # Optional in the API payload; omitted values default to `nil`. Wire name: `order_line_item`.
39
- # @return [Inttegro::Refund::OrderLineItem, nil]
41
+ # @return [Inttegro::Refund::OrderProductLineItem, Inttegro::Refund::OrderFeeLineItem, Inttegro::Refund::OrderShippingLineItem, nil]
40
42
  #
41
43
  # @!attribute [r] original_amount_paid
42
44
  # Value of the `original_amount_paid` field in the Inttegro API payload.
@@ -64,7 +66,7 @@ module Inttegro
64
66
  class LineItem < T::Struct
65
67
  const :id, String
66
68
  const :order_line_item_id, String
67
- const :order_line_item, T.nilable(Inttegro::Refund::OrderLineItem), default: nil
69
+ const :order_line_item, T.nilable(T.any(Inttegro::Refund::OrderProductLineItem, Inttegro::Refund::OrderFeeLineItem, Inttegro::Refund::OrderShippingLineItem)), default: nil
68
70
  const :original_amount_paid, Inttegro::Money::Amount
69
71
  const :reason, T.nilable(Inttegro::Refund::Reason), default: nil
70
72
  const :reason_details, T.nilable(String), default: nil
@@ -5,7 +5,8 @@
5
5
 
6
6
  require_relative "base"
7
7
  require_relative "payment_method_settlement_type"
8
- require_relative "settlement_payment_method"
8
+ require_relative "settlement_bank_account_payment_method"
9
+ require_relative "settlement_mobile_money_payment_method"
9
10
 
10
11
  module Inttegro
11
12
  class Refund
@@ -22,7 +23,7 @@ module Inttegro
22
23
  # management-only payment-method data is never included.
23
24
  #
24
25
  # Required in the API payload. Wire name: `payment_method`.
25
- # @return [Inttegro::Refund::SettlementPaymentMethod]
26
+ # @return [Inttegro::Refund::SettlementMobileMoneyPaymentMethod, Inttegro::Refund::SettlementBankAccountPaymentMethod]
26
27
  #
27
28
  # @!attribute [r] type
28
29
  # The refund returns to the original payment method used for the order.
@@ -30,7 +31,7 @@ module Inttegro
30
31
  # Required in the API payload. Wire name: `type`.
31
32
  # @return [Inttegro::Refund::PaymentMethodSettlementType]
32
33
  class PaymentMethodSettlement < T::Struct
33
- const :payment_method, Inttegro::Refund::SettlementPaymentMethod
34
+ const :payment_method, T.any(Inttegro::Refund::SettlementMobileMoneyPaymentMethod, Inttegro::Refund::SettlementBankAccountPaymentMethod)
34
35
  const :type, Inttegro::Refund::PaymentMethodSettlementType
35
36
 
36
37
  extend T::Sig
@@ -8,8 +8,9 @@ require_relative "../custom_data"
8
8
  require_relative "../money/amount"
9
9
  require_relative "failure"
10
10
  require_relative "line_item"
11
+ require_relative "offline_settlement"
12
+ require_relative "payment_method_settlement"
11
13
  require_relative "reason"
12
- require_relative "settlement"
13
14
  require_relative "status"
14
15
 
15
16
  module Inttegro
@@ -112,7 +113,7 @@ module Inttegro
112
113
  # original payment method; `offline` records settlement for an order paid outside Inttegro.
113
114
  #
114
115
  # Required in the API payload. Wire name: `settlement`.
115
- # @return [Inttegro::Refund::Settlement]
116
+ # @return [Inttegro::Refund::OfflineSettlement, Inttegro::Refund::PaymentMethodSettlement]
116
117
  #
117
118
  # @!attribute [r] status
118
119
  # Value of the `status` field in the Inttegro API payload.
@@ -146,7 +147,7 @@ module Inttegro
146
147
  const :reason, Inttegro::Refund::Reason
147
148
  const :reason_details, T.nilable(String), default: nil
148
149
  const :reference, T.nilable(String), default: nil
149
- const :settlement, Inttegro::Refund::Settlement
150
+ const :settlement, T.any(Inttegro::Refund::OfflineSettlement, Inttegro::Refund::PaymentMethodSettlement)
150
151
  const :status, Inttegro::Refund::Status
151
152
  const :succeeded_at, T.nilable(Time), default: nil
152
153
  const :total, Inttegro::Money::Amount
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ require_relative "../shared/children_policy_versions_page"
5
+
6
+ module Inttegro
7
+ module Resources
8
+ # Read access to the authenticated application's active children policy.
9
+ class ChildrenPolicies
10
+ extend T::Sig
11
+
12
+ sig { params(http: Inttegro::HTTPClient).void }
13
+ def initialize(http)
14
+ @http = T.let(http, Inttegro::HTTPClient)
15
+ end
16
+
17
+ sig { params(version: T.nilable(Integer)).returns(Inttegro::Shared::ChildrenPolicy) }
18
+ def lookup(version: nil)
19
+ validate_version!(version)
20
+ body = T.let({}, Inttegro::Types::Payload)
21
+ body[:version] = version unless version.nil?
22
+ @http.post_resource(
23
+ "/children_policies/lookup",
24
+ Inttegro::Shared::ChildrenPolicy,
25
+ :children_policy,
26
+ body
27
+ )
28
+ end
29
+
30
+ sig do
31
+ params(number: T.nilable(Integer), size: T.nilable(Integer))
32
+ .returns(Inttegro::Shared::ChildrenPolicyVersionsPage)
33
+ end
34
+ def page(number: nil, size: nil)
35
+ @http.post_resource(
36
+ "/children_policies/page",
37
+ Inttegro::Shared::ChildrenPolicyVersionsPage,
38
+ :page,
39
+ pagination_payload(number, size)
40
+ )
41
+ end
42
+
43
+ private
44
+
45
+ sig { params(version: T.nilable(Integer)).void }
46
+ def validate_version!(version)
47
+ return if version.nil? || version >= 1
48
+
49
+ raise ArgumentError, "version must be greater than or equal to 1"
50
+ end
51
+
52
+ sig { params(number: T.nilable(Integer), size: T.nilable(Integer)).returns(Inttegro::Types::Payload) }
53
+ def pagination_payload(number, size)
54
+ body = T.let({}, Inttegro::Types::Payload)
55
+ body[:number] = number unless number.nil?
56
+ body[:size] = size unless size.nil?
57
+ body
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+ # typed: strict
3
+
4
+ require_relative "../shared/operating_policy_versions_page"
5
+
6
+ module Inttegro
7
+ module Resources
8
+ # Create, look up, and version reusable operating policies.
9
+ class OperatingPolicies
10
+ extend T::Sig
11
+
12
+ sig { params(http: Inttegro::HTTPClient).void }
13
+ def initialize(http)
14
+ @http = T.let(http, Inttegro::HTTPClient)
15
+ end
16
+
17
+ sig do
18
+ params(payload: T.any(Inttegro::Types::Payload, Inttegro::Shared::CreateOperatingPolicyRequest))
19
+ .returns(Inttegro::Shared::OperatingPolicy)
20
+ end
21
+ def create(payload)
22
+ @http.post_resource(
23
+ "/operating_policies/create",
24
+ Inttegro::Shared::OperatingPolicy,
25
+ :operating_policy,
26
+ payload
27
+ )
28
+ end
29
+
30
+ sig do
31
+ params(operating_policy_id: String, version: T.nilable(Integer))
32
+ .returns(Inttegro::Shared::OperatingPolicy)
33
+ end
34
+ def lookup(operating_policy_id, version: nil)
35
+ validate_version!(version)
36
+ body = T.let({ operating_policy_id: operating_policy_id }, Inttegro::Types::Payload)
37
+ body[:version] = version unless version.nil?
38
+ @http.post_resource(
39
+ "/operating_policies/lookup",
40
+ Inttegro::Shared::OperatingPolicy,
41
+ :operating_policy,
42
+ body
43
+ )
44
+ end
45
+
46
+ sig do
47
+ params(
48
+ operating_policy_id: String,
49
+ number: T.nilable(Integer),
50
+ size: T.nilable(Integer)
51
+ ).returns(Inttegro::Shared::OperatingPolicyVersionsPage)
52
+ end
53
+ def page(operating_policy_id, number: nil, size: nil)
54
+ body = T.let({ operating_policy_id: operating_policy_id }, Inttegro::Types::Payload)
55
+ body[:number] = number unless number.nil?
56
+ body[:size] = size unless size.nil?
57
+ @http.post_resource(
58
+ "/operating_policies/page",
59
+ Inttegro::Shared::OperatingPolicyVersionsPage,
60
+ :page,
61
+ body
62
+ )
63
+ end
64
+
65
+ sig do
66
+ params(payload: T.any(Inttegro::Types::Payload, Inttegro::Shared::UpdateOperatingPolicyRequest))
67
+ .returns(Inttegro::Shared::OperatingPolicy)
68
+ end
69
+ def update(payload)
70
+ @http.post_resource(
71
+ "/operating_policies/update",
72
+ Inttegro::Shared::OperatingPolicy,
73
+ :operating_policy,
74
+ payload
75
+ )
76
+ end
77
+
78
+ private
79
+
80
+ sig { params(version: T.nilable(Integer)).void }
81
+ def validate_version!(version)
82
+ return if version.nil? || version >= 1
83
+
84
+ raise ArgumentError, "version must be greater than or equal to 1"
85
+ end
86
+ end
87
+ end
88
+ end
@@ -5,7 +5,9 @@
5
5
 
6
6
  require_relative "base"
7
7
  require_relative "../chime/email_message_input"
8
- require_relative "../chime/recipient"
8
+ require_relative "../chime/saved_customer_recipient"
9
+ require_relative "../chime/send_request_recipient_variant1_variant1"
10
+ require_relative "../chime/send_request_recipient_variant1_variant2"
9
11
  require_relative "../message_template/reference"
10
12
  require_relative "chime_request_request_meta"
11
13
 
@@ -30,7 +32,7 @@ module Inttegro
30
32
  # inline contact details or `customer_id`.
31
33
  #
32
34
  # Required in the API payload. Wire name: `recipients`.
33
- # @return [Array<Inttegro::Chime::Recipient>]
35
+ # @return [Array<Inttegro::Chime::SendRequestRecipientVariant1Variant1, Inttegro::Chime::SendRequestRecipientVariant1Variant2, Inttegro::Chime::SavedCustomerRecipient>]
34
36
  #
35
37
  # @!attribute [r] send_after
36
38
  # ISO 8601 timestamp for when to send the chime (must be in the future)
@@ -69,7 +71,7 @@ module Inttegro
69
71
  # @return [String, nil]
70
72
  class ChimeRequest < T::Struct
71
73
  const :request_meta, T.nilable(Inttegro::Schedule::ChimeRequestRequestMeta), default: nil
72
- const :recipients, T::Array[Inttegro::Chime::Recipient]
74
+ const :recipients, T::Array[T.any(T.any(Inttegro::Chime::SendRequestRecipientVariant1Variant1, Inttegro::Chime::SendRequestRecipientVariant1Variant2), Inttegro::Chime::SavedCustomerRecipient)]
73
75
  const :send_after, Time
74
76
  const :full_message, T.nilable(String), default: nil
75
77
  const :email, T.nilable(Inttegro::Chime::EmailMessageInput), default: nil