inttegro 6.0.0 → 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 +20 -1
  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
@@ -1,122 +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 "../money/amount"
8
- require_relative "activity_attribution"
9
- require_relative "activity_type"
10
- require_relative "activity_visitor"
11
-
12
- module Inttegro
13
- class PurchaseIntent
14
- # Typed representation of the activity object in the Inttegro API.
15
- #
16
- # This generated model is immutable. Construct it with `.new`, or decode a string-keyed API
17
- # payload with `.from_hash`. `#serialize` produces a string-keyed hash using the original wire
18
- # field names and serialized enum values.
19
- #
20
- # @api public
21
- #
22
- # @!attribute [r] amount
23
- # Value of the `amount` field in the Inttegro API payload.
24
- #
25
- # Optional in the API payload; omitted values default to `nil`. Wire name: `amount`.
26
- # @return [Inttegro::Money::Amount, nil]
27
- #
28
- # @!attribute [r] attribution
29
- # Value of the `attribution` field in the Inttegro API payload.
30
- #
31
- # Optional in the API payload; omitted values default to `nil`. Wire name: `attribution`.
32
- # @return [Inttegro::PurchaseIntent::ActivityAttribution, nil]
33
- #
34
- # @!attribute [r] created_at
35
- # Value of the `created_at` field in the Inttegro API payload.
36
- #
37
- # Required in the API payload. Wire name: `created_at`.
38
- # @return [Time]
39
- #
40
- # @!attribute [r] error_code
41
- # Value of the `error_code` field in the Inttegro API payload.
42
- #
43
- # Optional in the API payload; omitted values default to `nil`. Wire name: `error_code`.
44
- # @return [String, nil]
45
- #
46
- # @!attribute [r] id
47
- # Activity event ID with saleevt_ prefix
48
- #
49
- # Required in the API payload. Wire name: `id`.
50
- # @return [String]
51
- #
52
- # @!attribute [r] order_id
53
- # Value of the `order_id` field in the Inttegro API payload.
54
- #
55
- # Optional in the API payload; omitted values default to `nil`. Wire name: `order_id`.
56
- # @return [String, nil]
57
- #
58
- # @!attribute [r] payment_id
59
- # Value of the `payment_id` field in the Inttegro API payload.
60
- #
61
- # Optional in the API payload; omitted values default to `nil`. Wire name: `payment_id`.
62
- # @return [String, nil]
63
- #
64
- # @!attribute [r] product_id
65
- # Value of the `product_id` field in the Inttegro API payload.
66
- #
67
- # Optional in the API payload; omitted values default to `nil`. Wire name: `product_id`.
68
- # @return [String, nil]
69
- #
70
- # @!attribute [r] purchase_intent_id
71
- # Purchase intent ID with sale_ prefix
72
- #
73
- # Required in the API payload. Wire name: `purchase_intent_id`.
74
- # @return [String]
75
- #
76
- # @!attribute [r] quantity
77
- # Value of the `quantity` field in the Inttegro API payload.
78
- #
79
- # Optional in the API payload; omitted values default to `nil`. Wire name: `quantity`.
80
- # @return [Integer, nil]
81
- #
82
- # @!attribute [r] source
83
- # Value of the `source` field in the Inttegro API payload.
84
- #
85
- # Optional in the API payload; omitted values default to `nil`. Wire name: `source`.
86
- # @return [String, nil]
87
- #
88
- # @!attribute [r] type
89
- # Value of the `type` field in the Inttegro API payload.
90
- #
91
- # Required in the API payload. Wire name: `type`.
92
- # @return [Inttegro::PurchaseIntent::ActivityType]
93
- #
94
- # @!attribute [r] variant_product_id
95
- # Value of the `variant_product_id` field in the Inttegro API payload.
96
- #
97
- # Optional in the API payload; omitted values default to `nil`. Wire name: `variant_product_id`.
98
- # @return [String, nil]
99
- #
100
- # @!attribute [r] visitor
101
- # Value of the `visitor` field in the Inttegro API payload.
102
- #
103
- # Optional in the API payload; omitted values default to `nil`. Wire name: `visitor`.
104
- # @return [Inttegro::PurchaseIntent::ActivityVisitor, nil]
105
- class Activity < T::Struct
106
- const :amount, T.nilable(Inttegro::Money::Amount), default: nil
107
- const :attribution, T.nilable(Inttegro::PurchaseIntent::ActivityAttribution), default: nil
108
- const :created_at, Time
109
- const :error_code, T.nilable(String), default: nil
110
- const :id, String
111
- const :order_id, T.nilable(String), default: nil
112
- const :payment_id, T.nilable(String), default: nil
113
- const :product_id, T.nilable(String), default: nil
114
- const :purchase_intent_id, String
115
- const :quantity, T.nilable(Integer), default: nil
116
- const :source, T.nilable(String), default: nil
117
- const :type, Inttegro::PurchaseIntent::ActivityType
118
- const :variant_product_id, T.nilable(String), default: nil
119
- const :visitor, T.nilable(Inttegro::PurchaseIntent::ActivityVisitor), default: nil
120
- end
121
- end
122
- end
@@ -1,83 +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
-
8
- module Inttegro
9
- class PurchaseIntent
10
- # Typed representation of the activity attribution 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] campaign
19
- # Value of the `campaign` field in the Inttegro API payload.
20
- #
21
- # Optional in the API payload; omitted values default to `nil`. Wire name: `campaign`.
22
- # @return [String, nil]
23
- #
24
- # @!attribute [r] channel
25
- # Value of the `channel` field in the Inttegro API payload.
26
- #
27
- # Optional in the API payload; omitted values default to `nil`. Wire name: `channel`.
28
- # @return [String, nil]
29
- #
30
- # @!attribute [r] content
31
- # Value of the `content` field in the Inttegro API payload.
32
- #
33
- # Optional in the API payload; omitted values default to `nil`. Wire name: `content`.
34
- # @return [String, nil]
35
- #
36
- # @!attribute [r] landing_url
37
- # Value of the `landing_url` field in the Inttegro API payload.
38
- #
39
- # Optional in the API payload; omitted values default to `nil`. Wire name: `landing_url`.
40
- # @return [String, nil]
41
- #
42
- # @!attribute [r] medium
43
- # Value of the `medium` field in the Inttegro API payload.
44
- #
45
- # Optional in the API payload; omitted values default to `nil`. Wire name: `medium`.
46
- # @return [String, nil]
47
- #
48
- # @!attribute [r] referrer
49
- # Value of the `referrer` field in the Inttegro API payload.
50
- #
51
- # Optional in the API payload; omitted values default to `nil`. Wire name: `referrer`.
52
- # @return [String, nil]
53
- #
54
- # @!attribute [r] referrer_host
55
- # Value of the `referrer_host` field in the Inttegro API payload.
56
- #
57
- # Optional in the API payload; omitted values default to `nil`. Wire name: `referrer_host`.
58
- # @return [String, nil]
59
- #
60
- # @!attribute [r] source
61
- # Value of the `source` field in the Inttegro API payload.
62
- #
63
- # Optional in the API payload; omitted values default to `nil`. Wire name: `source`.
64
- # @return [String, nil]
65
- #
66
- # @!attribute [r] term
67
- # Value of the `term` field in the Inttegro API payload.
68
- #
69
- # Optional in the API payload; omitted values default to `nil`. Wire name: `term`.
70
- # @return [String, nil]
71
- class ActivityAttribution < T::Struct
72
- const :campaign, T.nilable(String), default: nil
73
- const :channel, T.nilable(String), default: nil
74
- const :content, T.nilable(String), default: nil
75
- const :landing_url, T.nilable(String), default: nil
76
- const :medium, T.nilable(String), default: nil
77
- const :referrer, T.nilable(String), default: nil
78
- const :referrer_host, T.nilable(String), default: nil
79
- const :source, T.nilable(String), default: nil
80
- const :term, T.nilable(String), default: nil
81
- end
82
- end
83
- end
@@ -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 "activity"
8
-
9
- module Inttegro
10
- class PurchaseIntent
11
- # Recent authenticated-owner activity for the purchase intent.
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] recent
20
- # Value of the `recent` field in the Inttegro API payload.
21
- #
22
- # Optional in the API payload; omitted values default to `nil`. Wire name: `recent`.
23
- # @return [Array<Inttegro::PurchaseIntent::Activity>, nil]
24
- class ActivityLog < T::Struct
25
- const :recent, T.nilable(T::Array[Inttegro::PurchaseIntent::Activity]), default: nil
26
- end
27
- end
28
- end
@@ -1,37 +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
-
8
- module Inttegro
9
- class PurchaseIntent
10
- # String-backed values accepted by the Inttegro API for
11
- # Inttegro::PurchaseIntent::ActivityType.
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 ActivityType < T::Enum
18
- enums do
19
- # Serialized wire value: `expired_viewed`.
20
- # @return [Inttegro::PurchaseIntent::ActivityType]
21
- EXPIRED_VIEWED = new("expired_viewed")
22
- # Serialized wire value: `order_created`.
23
- # @return [Inttegro::PurchaseIntent::ActivityType]
24
- ORDER_CREATED = new("order_created")
25
- # Serialized wire value: `payment_failed`.
26
- # @return [Inttegro::PurchaseIntent::ActivityType]
27
- PAYMENT_FAILED = new("payment_failed")
28
- # Serialized wire value: `payment_started`.
29
- # @return [Inttegro::PurchaseIntent::ActivityType]
30
- PAYMENT_STARTED = new("payment_started")
31
- # Serialized wire value: `viewed`.
32
- # @return [Inttegro::PurchaseIntent::ActivityType]
33
- VIEWED = new("viewed")
34
- end
35
- end
36
- end
37
- end
@@ -1,97 +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
-
8
- module Inttegro
9
- class PurchaseIntent
10
- # Typed representation of the activity visitor 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] browser
19
- # Value of the `browser` field in the Inttegro API payload.
20
- #
21
- # Optional in the API payload; omitted values default to `nil`. Wire name: `browser`.
22
- # @return [String, nil]
23
- #
24
- # @!attribute [r] city
25
- # Value of the `city` field in the Inttegro API payload.
26
- #
27
- # Optional in the API payload; omitted values default to `nil`. Wire name: `city`.
28
- # @return [String, nil]
29
- #
30
- # @!attribute [r] country
31
- # Value of the `country` field in the Inttegro API payload.
32
- #
33
- # Optional in the API payload; omitted values default to `nil`. Wire name: `country`.
34
- # @return [String, nil]
35
- #
36
- # @!attribute [r] device
37
- # Value of the `device` field in the Inttegro API payload.
38
- #
39
- # Optional in the API payload; omitted values default to `nil`. Wire name: `device`.
40
- # @return [String, nil]
41
- #
42
- # @!attribute [r] ip_address
43
- # Request IP address when retained for the activity type
44
- #
45
- # Optional in the API payload; omitted values default to `nil`. Wire name: `ip_address`.
46
- # @return [String, nil]
47
- #
48
- # @!attribute [r] os
49
- # Value of the `os` field in the Inttegro API payload.
50
- #
51
- # Optional in the API payload; omitted values default to `nil`. Wire name: `os`.
52
- # @return [String, nil]
53
- #
54
- # @!attribute [r] region
55
- # Value of the `region` field in the Inttegro API payload.
56
- #
57
- # Optional in the API payload; omitted values default to `nil`. Wire name: `region`.
58
- # @return [String, nil]
59
- #
60
- # @!attribute [r] session_id
61
- # Value of the `session_id` field in the Inttegro API payload.
62
- #
63
- # Optional in the API payload; omitted values default to `nil`. Wire name: `session_id`.
64
- # @return [String, nil]
65
- #
66
- # @!attribute [r] timezone
67
- # Value of the `timezone` field in the Inttegro API payload.
68
- #
69
- # Optional in the API payload; omitted values default to `nil`. Wire name: `timezone`.
70
- # @return [String, nil]
71
- #
72
- # @!attribute [r] user_agent
73
- # Value of the `user_agent` field in the Inttegro API payload.
74
- #
75
- # Optional in the API payload; omitted values default to `nil`. Wire name: `user_agent`.
76
- # @return [String, nil]
77
- #
78
- # @!attribute [r] visitor_id
79
- # Value of the `visitor_id` field in the Inttegro API payload.
80
- #
81
- # Optional in the API payload; omitted values default to `nil`. Wire name: `visitor_id`.
82
- # @return [String, nil]
83
- class ActivityVisitor < T::Struct
84
- const :browser, T.nilable(String), default: nil
85
- const :city, T.nilable(String), default: nil
86
- const :country, T.nilable(String), default: nil
87
- const :device, T.nilable(String), default: nil
88
- const :ip_address, T.nilable(String), default: nil
89
- const :os, T.nilable(String), default: nil
90
- const :region, T.nilable(String), default: nil
91
- const :session_id, T.nilable(String), default: nil
92
- const :timezone, T.nilable(String), default: nil
93
- const :user_agent, T.nilable(String), default: nil
94
- const :visitor_id, T.nilable(String), default: nil
95
- end
96
- end
97
- end
@@ -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 "../payout/payout"
8
-
9
- module Inttegro
10
- module Schedule
11
- # Typed representation of the payout 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] payout
20
- # A payout scheduled from your Inttegro balance to a destination financial account
21
- #
22
- # Optional in the API payload; omitted values default to `nil`. Wire name: `payout`.
23
- # @return [Inttegro::Payout, nil]
24
- class PayoutResponse < T::Struct
25
- const :payout, T.nilable(Inttegro::Payout), default: nil
26
- end
27
- end
28
- end