dodopayments 2.27.0 → 2.28.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/type/union.rb +15 -5
- data/lib/dodopayments/models/balance_ledger_entry.rb +2 -0
- data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +2 -0
- data/lib/dodopayments/models/checkout_session_preview_response.rb +10 -1
- data/lib/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rb +1 -1
- data/lib/dodopayments/models/credit_entitlements/balance_create_ledger_entry_response.rb +21 -1
- data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +2 -7
- data/lib/dodopayments/models/customers/email_body.rb +57 -0
- data/lib/dodopayments/models/customers/email_failure_code.rb +27 -0
- data/lib/dodopayments/models/customers/email_list_params.rb +39 -0
- data/lib/dodopayments/models/customers/email_log_item.rb +121 -0
- data/lib/dodopayments/models/customers/email_log_status.rb +24 -0
- data/lib/dodopayments/models/customers/email_policies.rb +45 -0
- data/lib/dodopayments/models/customers/email_retrieve_body_params.rb +28 -0
- data/lib/dodopayments/models/price.rb +95 -27
- data/lib/dodopayments/models/subscription.rb +10 -1
- data/lib/dodopayments/models/subscription_create_response.rb +10 -1
- data/lib/dodopayments/models/subscription_list_response.rb +10 -1
- data/lib/dodopayments/resources/credit_entitlements/balances.rb +1 -0
- data/lib/dodopayments/resources/customers/emails.rb +76 -0
- data/lib/dodopayments/resources/customers.rb +4 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +8 -0
- data/rbi/dodopayments/models/balance_ledger_entry.rbi +10 -0
- data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +10 -0
- data/rbi/dodopayments/models/checkout_session_preview_response.rbi +10 -0
- data/rbi/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rbi +2 -2
- data/rbi/dodopayments/models/credit_entitlements/balance_create_ledger_entry_response.rbi +8 -0
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +2 -6
- data/rbi/dodopayments/models/customers/email_body.rbi +88 -0
- data/rbi/dodopayments/models/customers/email_failure_code.rbi +70 -0
- data/rbi/dodopayments/models/customers/email_list_params.rbi +68 -0
- data/rbi/dodopayments/models/customers/email_log_item.rbi +157 -0
- data/rbi/dodopayments/models/customers/email_log_status.rbi +46 -0
- data/rbi/dodopayments/models/customers/email_policies.rbi +68 -0
- data/rbi/dodopayments/models/customers/email_retrieve_body_params.rbi +48 -0
- data/rbi/dodopayments/models/price.rbi +124 -25
- data/rbi/dodopayments/models/subscription.rbi +10 -0
- data/rbi/dodopayments/models/subscription_create_response.rbi +10 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +10 -0
- data/rbi/dodopayments/resources/credit_entitlements/balances.rbi +2 -1
- data/rbi/dodopayments/resources/customers/emails.rbi +60 -0
- data/rbi/dodopayments/resources/customers.rbi +3 -0
- data/sig/dodopayments/models/balance_ledger_entry.rbs +4 -0
- data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +4 -0
- data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
- data/sig/dodopayments/models/credit_entitlements/balance_create_ledger_entry_response.rbs +5 -0
- data/sig/dodopayments/models/customers/email_body.rbs +42 -0
- data/sig/dodopayments/models/customers/email_failure_code.rbs +30 -0
- data/sig/dodopayments/models/customers/email_list_params.rbs +38 -0
- data/sig/dodopayments/models/customers/email_log_item.rbs +82 -0
- data/sig/dodopayments/models/customers/email_log_status.rbs +20 -0
- data/sig/dodopayments/models/customers/email_policies.rbs +37 -0
- data/sig/dodopayments/models/customers/email_retrieve_body_params.rbs +30 -0
- data/sig/dodopayments/models/price.rbs +52 -17
- data/sig/dodopayments/models/subscription.rbs +5 -0
- data/sig/dodopayments/models/subscription_create_response.rbs +5 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +5 -0
- data/sig/dodopayments/resources/customers/emails.rbs +22 -0
- data/sig/dodopayments/resources/customers.rbs +2 -0
- metadata +26 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b32ea53fb134977455a92138cff5c8a7bceead17ce5eccdbdd485356d1f3a5ba
|
|
4
|
+
data.tar.gz: d414ba715f8003dd68dedc9794653a9026981713b7e6d64b20d79a592b85b61e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f54eb9030b4e66d423f4b96cf1f3bb44348ca401fc0c998e92ff6d215ac64b94b0083bc80168280e5862a59afa6daaa9cb1afe91a7ba0029d6f288ea256a96e7
|
|
7
|
+
data.tar.gz: d322f54386e42dbb6ea72b73b4803b0823802018430abef804274d7cc0dcb8f9716e5f7cbac438bd8ec30c81b26a7d8ed96f727ee1b4a19ac9e8279ea42f824a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.28.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.27.0...v2.28.0) (2026-09-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** add customer email logs ([05c9087](https://github.com/dodopayments/dodopayments-ruby/commit/05c90872fff106b200f7abf64bb7be0fe8fd566a))
|
|
9
|
+
* **api:** add customer email logs ([87730fa](https://github.com/dodopayments/dodopayments-ruby/commit/87730faf0153a9b9a02cdee21ee0c5fe386a3532))
|
|
10
|
+
|
|
3
11
|
## [2.27.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.26.0...v2.27.0) (2026-09-01)
|
|
4
12
|
|
|
5
13
|
|
data/README.md
CHANGED
|
@@ -11,7 +11,7 @@ module Dodopayments
|
|
|
11
11
|
# when Dodopayments::Price::OneTimePrice
|
|
12
12
|
# puts(price.currency)
|
|
13
13
|
# when Dodopayments::Price::RecurringPrice
|
|
14
|
-
# puts(price.
|
|
14
|
+
# puts(price.payment_frequency_count)
|
|
15
15
|
# when Dodopayments::Price::UsageBasedPrice
|
|
16
16
|
# puts(price.fixed_price)
|
|
17
17
|
# else
|
|
@@ -20,11 +20,21 @@ module Dodopayments
|
|
|
20
20
|
#
|
|
21
21
|
# @example
|
|
22
22
|
# case price
|
|
23
|
-
# in {type: :one_time_price, currency: currency,
|
|
23
|
+
# in {type: :one_time_price, currency: currency, price: price, discount: discount}
|
|
24
24
|
# puts(currency)
|
|
25
|
-
# in {
|
|
26
|
-
#
|
|
27
|
-
#
|
|
25
|
+
# in {
|
|
26
|
+
# type: :recurring_price,
|
|
27
|
+
# currency: currency,
|
|
28
|
+
# payment_frequency_count: payment_frequency_count,
|
|
29
|
+
# payment_frequency_interval: payment_frequency_interval
|
|
30
|
+
# }
|
|
31
|
+
# puts(payment_frequency_count)
|
|
32
|
+
# in {
|
|
33
|
+
# type: :usage_based_price,
|
|
34
|
+
# currency: currency,
|
|
35
|
+
# fixed_price: fixed_price,
|
|
36
|
+
# payment_frequency_count: payment_frequency_count
|
|
37
|
+
# }
|
|
28
38
|
# puts(fixed_price)
|
|
29
39
|
# else
|
|
30
40
|
# puts(price)
|
|
@@ -110,6 +110,8 @@ module Dodopayments
|
|
|
110
110
|
DUNNING_FEES = :dunning_fees
|
|
111
111
|
PAYMENT_RETRY_FEE = :payment_retry_fee
|
|
112
112
|
BYOP_FEE = :byop_fee
|
|
113
|
+
ETHOCA_FEES = :ethoca_fees
|
|
114
|
+
ETHOCA_FEES_REVERSAL = :ethoca_fees_reversal
|
|
113
115
|
|
|
114
116
|
# @!method self.values
|
|
115
117
|
# @return [Array<Symbol>]
|
|
@@ -257,6 +257,8 @@ module Dodopayments
|
|
|
257
257
|
DUNNING_FEES = :dunning_fees
|
|
258
258
|
PAYMENT_RETRY_FEE = :payment_retry_fee
|
|
259
259
|
BYOP_FEE = :byop_fee
|
|
260
|
+
ETHOCA_FEES = :ethoca_fees
|
|
261
|
+
ETHOCA_FEES_REVERSAL = :ethoca_fees_reversal
|
|
260
262
|
|
|
261
263
|
# @!method self.values
|
|
262
264
|
# @return [Array<Symbol>]
|
|
@@ -31,6 +31,13 @@ module Dodopayments
|
|
|
31
31
|
# @return [Boolean]
|
|
32
32
|
required :is_byop, Dodopayments::Internal::Type::Boolean
|
|
33
33
|
|
|
34
|
+
# @!attribute payment_method_required
|
|
35
|
+
# False when the customer can confirm this session with no card. True for every
|
|
36
|
+
# other cart, including a one-time cart.
|
|
37
|
+
#
|
|
38
|
+
# @return [Boolean]
|
|
39
|
+
required :payment_method_required, Dodopayments::Internal::Type::Boolean
|
|
40
|
+
|
|
34
41
|
# @!attribute product_cart
|
|
35
42
|
# The total product cart
|
|
36
43
|
#
|
|
@@ -100,7 +107,7 @@ module Dodopayments
|
|
|
100
107
|
# @return [Integer, nil]
|
|
101
108
|
optional :trial_period_days, Integer, nil?: true
|
|
102
109
|
|
|
103
|
-
# @!method initialize(billing_country:, currency:, current_breakup:, is_byop:, product_cart:, total_price:, next_billing_date: nil, recurring_breakup: nil, tax_id_business_name: nil, tax_id_err_msg: nil, tax_id_format_name: nil, total_tax: nil, trial_amount: nil, trial_period_days: nil)
|
|
110
|
+
# @!method initialize(billing_country:, currency:, current_breakup:, is_byop:, payment_method_required:, product_cart:, total_price:, next_billing_date: nil, recurring_breakup: nil, tax_id_business_name: nil, tax_id_err_msg: nil, tax_id_format_name: nil, total_tax: nil, trial_amount: nil, trial_period_days: nil)
|
|
104
111
|
# Some parameter documentations has been truncated, see
|
|
105
112
|
# {Dodopayments::Models::CheckoutSessionPreviewResponse} for more details.
|
|
106
113
|
#
|
|
@@ -114,6 +121,8 @@ module Dodopayments
|
|
|
114
121
|
#
|
|
115
122
|
# @param is_byop [Boolean] Whether the payment will be routed through the merchant's own
|
|
116
123
|
#
|
|
124
|
+
# @param payment_method_required [Boolean] False when the customer can confirm this session with no card. True for
|
|
125
|
+
#
|
|
117
126
|
# @param product_cart [Array<Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart>] The total product cart
|
|
118
127
|
#
|
|
119
128
|
# @param total_price [Integer] Total calculate price of the product cart
|
|
@@ -50,6 +50,12 @@ module Dodopayments
|
|
|
50
50
|
# @return [Boolean]
|
|
51
51
|
required :is_credit, Dodopayments::Internal::Type::Boolean
|
|
52
52
|
|
|
53
|
+
# @!attribute metadata
|
|
54
|
+
# Metadata stored on this entry.
|
|
55
|
+
#
|
|
56
|
+
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
57
|
+
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
58
|
+
|
|
53
59
|
# @!attribute overage_after
|
|
54
60
|
#
|
|
55
61
|
# @return [String]
|
|
@@ -70,21 +76,35 @@ module Dodopayments
|
|
|
70
76
|
# @return [String, nil]
|
|
71
77
|
optional :reason, String, nil?: true
|
|
72
78
|
|
|
73
|
-
# @!method initialize(id:, amount:, balance_after:, balance_before:, created_at:, credit_entitlement_id:, customer_id:, entry_type:, is_credit:, overage_after:, overage_before:, grant_id: nil, reason: nil)
|
|
79
|
+
# @!method initialize(id:, amount:, balance_after:, balance_before:, created_at:, credit_entitlement_id:, customer_id:, entry_type:, is_credit:, metadata:, overage_after:, overage_before:, grant_id: nil, reason: nil)
|
|
74
80
|
# Response for creating a ledger entry
|
|
75
81
|
#
|
|
76
82
|
# @param id [String]
|
|
83
|
+
#
|
|
77
84
|
# @param amount [String]
|
|
85
|
+
#
|
|
78
86
|
# @param balance_after [String]
|
|
87
|
+
#
|
|
79
88
|
# @param balance_before [String]
|
|
89
|
+
#
|
|
80
90
|
# @param created_at [Time]
|
|
91
|
+
#
|
|
81
92
|
# @param credit_entitlement_id [String]
|
|
93
|
+
#
|
|
82
94
|
# @param customer_id [String]
|
|
95
|
+
#
|
|
83
96
|
# @param entry_type [Symbol, Dodopayments::Models::CreditEntitlements::LedgerEntryType]
|
|
97
|
+
#
|
|
84
98
|
# @param is_credit [Boolean]
|
|
99
|
+
#
|
|
100
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Metadata stored on this entry.
|
|
101
|
+
#
|
|
85
102
|
# @param overage_after [String]
|
|
103
|
+
#
|
|
86
104
|
# @param overage_before [String]
|
|
105
|
+
#
|
|
87
106
|
# @param grant_id [String, nil]
|
|
107
|
+
#
|
|
88
108
|
# @param reason [String, nil]
|
|
89
109
|
end
|
|
90
110
|
end
|
|
@@ -57,9 +57,7 @@ module Dodopayments
|
|
|
57
57
|
required :is_credit, Dodopayments::Internal::Type::Boolean
|
|
58
58
|
|
|
59
59
|
# @!attribute metadata
|
|
60
|
-
# Metadata associated with
|
|
61
|
-
# created at checkout). Empty when the grant has no resolvable source (e.g.
|
|
62
|
-
# credits granted directly via the API).
|
|
60
|
+
# Metadata associated with this entry.
|
|
63
61
|
#
|
|
64
62
|
# @return [Hash{Symbol=>String, Float, Boolean}]
|
|
65
63
|
required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }
|
|
@@ -101,9 +99,6 @@ module Dodopayments
|
|
|
101
99
|
optional :reference_type, String, nil?: true
|
|
102
100
|
|
|
103
101
|
# @!method initialize(id:, amount:, balance_after:, balance_before:, brand_id:, business_id:, created_at:, credit_entitlement_id:, customer_id:, is_credit:, metadata:, overage_after:, overage_before:, transaction_type:, description: nil, grant_id: nil, reference_id: nil, reference_type: nil)
|
|
104
|
-
# Some parameter documentations has been truncated, see
|
|
105
|
-
# {Dodopayments::Models::CreditEntitlements::CreditLedgerEntry} for more details.
|
|
106
|
-
#
|
|
107
102
|
# Response for a ledger entry
|
|
108
103
|
#
|
|
109
104
|
# @param id [String]
|
|
@@ -126,7 +121,7 @@ module Dodopayments
|
|
|
126
121
|
#
|
|
127
122
|
# @param is_credit [Boolean]
|
|
128
123
|
#
|
|
129
|
-
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Metadata associated with
|
|
124
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean}] Metadata associated with this entry.
|
|
130
125
|
#
|
|
131
126
|
# @param overage_after [String]
|
|
132
127
|
#
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
# @see Dodopayments::Resources::Customers::Emails#retrieve_body
|
|
7
|
+
class EmailBody < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute merchant_authored
|
|
9
|
+
# Whether the merchant wrote this content. It is true for the recovery and dunning
|
|
10
|
+
# emails, which the merchant writes.
|
|
11
|
+
#
|
|
12
|
+
# The content is email HTML. Render it in a sandbox, whatever this value is.
|
|
13
|
+
#
|
|
14
|
+
# @return [Boolean]
|
|
15
|
+
required :merchant_authored, Dodopayments::Internal::Type::Boolean
|
|
16
|
+
|
|
17
|
+
# @!attribute failure_code
|
|
18
|
+
# Why the email did not arrive. It is null unless the email failed.
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, Dodopayments::Models::Customers::EmailFailureCode, nil]
|
|
21
|
+
optional :failure_code, enum: -> { Dodopayments::Customers::EmailFailureCode }, nil?: true
|
|
22
|
+
|
|
23
|
+
# @!attribute failure_reason
|
|
24
|
+
# A sentence that explains `failure_code`. It is null unless the email failed.
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :failure_reason, String, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute html
|
|
30
|
+
# The stored HTML. It is null on a text-only email.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :html, String, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute text
|
|
36
|
+
# The stored plain text.
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
optional :text, String, nil?: true
|
|
40
|
+
|
|
41
|
+
# @!method initialize(merchant_authored:, failure_code: nil, failure_reason: nil, html: nil, text: nil)
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {Dodopayments::Models::Customers::EmailBody} for more details.
|
|
44
|
+
#
|
|
45
|
+
# @param merchant_authored [Boolean] Whether the merchant wrote this content. It is true for the recovery
|
|
46
|
+
#
|
|
47
|
+
# @param failure_code [Symbol, Dodopayments::Models::Customers::EmailFailureCode, nil] Why the email did not arrive. It is null unless the email failed.
|
|
48
|
+
#
|
|
49
|
+
# @param failure_reason [String, nil] A sentence that explains `failure_code`. It is null unless the email
|
|
50
|
+
#
|
|
51
|
+
# @param html [String, nil] The stored HTML. It is null on a text-only email.
|
|
52
|
+
#
|
|
53
|
+
# @param text [String, nil] The stored plain text.
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
# Why an email did not reach the recipient.
|
|
7
|
+
#
|
|
8
|
+
# The code is stable. `send_failed` is the catch-all: it covers every failure that
|
|
9
|
+
# the other codes do not name.
|
|
10
|
+
module EmailFailureCode
|
|
11
|
+
extend Dodopayments::Internal::Type::Enum
|
|
12
|
+
|
|
13
|
+
MAILBOX_NOT_FOUND = :mailbox_not_found
|
|
14
|
+
ADDRESS_REJECTED = :address_rejected
|
|
15
|
+
ADDRESS_SUPPRESSED = :address_suppressed
|
|
16
|
+
MAILBOX_FULL = :mailbox_full
|
|
17
|
+
TEMPORARY_FAILURE = :temporary_failure
|
|
18
|
+
MESSAGE_TOO_LARGE = :message_too_large
|
|
19
|
+
MARKED_AS_SPAM = :marked_as_spam
|
|
20
|
+
SEND_FAILED = :send_failed
|
|
21
|
+
|
|
22
|
+
# @!method self.values
|
|
23
|
+
# @return [Array<Symbol>]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
# @see Dodopayments::Resources::Customers::Emails#list
|
|
7
|
+
class EmailListParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute customer_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :customer_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute page_number
|
|
17
|
+
# Which page to return. The default is 0.
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :page_number, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute page_size
|
|
23
|
+
# How many emails to return. The default is 10 and the maximum is 100.
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :page_size, Integer
|
|
27
|
+
|
|
28
|
+
# @!method initialize(customer_id:, page_number: nil, page_size: nil, request_options: {})
|
|
29
|
+
# @param customer_id [String]
|
|
30
|
+
#
|
|
31
|
+
# @param page_number [Integer] Which page to return. The default is 0.
|
|
32
|
+
#
|
|
33
|
+
# @param page_size [Integer] How many emails to return. The default is 10 and the maximum is 100.
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
# @see Dodopayments::Resources::Customers::Emails#list
|
|
7
|
+
class EmailLogItem < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute category
|
|
9
|
+
# The group this email belongs to: payments, refunds, subscriptions,
|
|
10
|
+
# dunning_recovery, entitlements or auth.
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :category, String
|
|
14
|
+
|
|
15
|
+
# @!attribute created_at
|
|
16
|
+
# When this email was sent.
|
|
17
|
+
#
|
|
18
|
+
# @return [Time]
|
|
19
|
+
required :created_at, Time
|
|
20
|
+
|
|
21
|
+
# @!attribute email_log_id
|
|
22
|
+
# Identifies this email. Use it to read the body or to send it again.
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
required :email_log_id, String
|
|
26
|
+
|
|
27
|
+
# @!attribute email_type
|
|
28
|
+
# What kind of email this is, for example `payment_successful`.
|
|
29
|
+
#
|
|
30
|
+
# @return [String]
|
|
31
|
+
required :email_type, String
|
|
32
|
+
|
|
33
|
+
# @!attribute has_preview
|
|
34
|
+
# Whether this email has content to show. The content endpoint can still refuse,
|
|
35
|
+
# because the content is removed after 180 days.
|
|
36
|
+
#
|
|
37
|
+
# @return [Boolean]
|
|
38
|
+
required :has_preview, Dodopayments::Internal::Type::Boolean
|
|
39
|
+
|
|
40
|
+
# @!attribute policies
|
|
41
|
+
# What you may do with this email.
|
|
42
|
+
#
|
|
43
|
+
# @return [Dodopayments::Models::Customers::EmailPolicies]
|
|
44
|
+
required :policies, -> { Dodopayments::Customers::EmailPolicies }
|
|
45
|
+
|
|
46
|
+
# @!attribute status
|
|
47
|
+
# Where the email got to: sent, delivered, failed, complained or blocked.
|
|
48
|
+
#
|
|
49
|
+
# @return [Symbol, Dodopayments::Models::Customers::EmailLogStatus]
|
|
50
|
+
required :status, enum: -> { Dodopayments::Customers::EmailLogStatus }
|
|
51
|
+
|
|
52
|
+
# @!attribute failure_code
|
|
53
|
+
# Why the email did not arrive. It is null unless the email failed.
|
|
54
|
+
#
|
|
55
|
+
# @return [Symbol, Dodopayments::Models::Customers::EmailFailureCode, nil]
|
|
56
|
+
optional :failure_code, enum: -> { Dodopayments::Customers::EmailFailureCode }, nil?: true
|
|
57
|
+
|
|
58
|
+
# @!attribute failure_reason
|
|
59
|
+
# A sentence that explains `failure_code`. It is null unless the email failed.
|
|
60
|
+
#
|
|
61
|
+
# @return [String, nil]
|
|
62
|
+
optional :failure_reason, String, nil?: true
|
|
63
|
+
|
|
64
|
+
# @!attribute from
|
|
65
|
+
# The address the email was sent from.
|
|
66
|
+
#
|
|
67
|
+
# @return [String, nil]
|
|
68
|
+
optional :from, String, nil?: true
|
|
69
|
+
|
|
70
|
+
# @!attribute intended_recipient
|
|
71
|
+
# What the merchant typed, when test mode redirected the send to the business
|
|
72
|
+
# owner.
|
|
73
|
+
#
|
|
74
|
+
# @return [String, nil]
|
|
75
|
+
optional :intended_recipient, String, nil?: true
|
|
76
|
+
|
|
77
|
+
# @!attribute recipient
|
|
78
|
+
# The address the email reached.
|
|
79
|
+
#
|
|
80
|
+
# @return [String, nil]
|
|
81
|
+
optional :recipient, String, nil?: true
|
|
82
|
+
|
|
83
|
+
# @!attribute subject
|
|
84
|
+
# The subject line as it was sent. Empty until the provider replicates.
|
|
85
|
+
#
|
|
86
|
+
# @return [String, nil]
|
|
87
|
+
optional :subject, String, nil?: true
|
|
88
|
+
|
|
89
|
+
# @!method initialize(category:, created_at:, email_log_id:, email_type:, has_preview:, policies:, status:, failure_code: nil, failure_reason: nil, from: nil, intended_recipient: nil, recipient: nil, subject: nil)
|
|
90
|
+
# Some parameter documentations has been truncated, see
|
|
91
|
+
# {Dodopayments::Models::Customers::EmailLogItem} for more details.
|
|
92
|
+
#
|
|
93
|
+
# @param category [String] The group this email belongs to: payments, refunds, subscriptions,
|
|
94
|
+
#
|
|
95
|
+
# @param created_at [Time] When this email was sent.
|
|
96
|
+
#
|
|
97
|
+
# @param email_log_id [String] Identifies this email. Use it to read the body or to send it again.
|
|
98
|
+
#
|
|
99
|
+
# @param email_type [String] What kind of email this is, for example `payment_successful`.
|
|
100
|
+
#
|
|
101
|
+
# @param has_preview [Boolean] Whether this email has content to show. The content endpoint can still
|
|
102
|
+
#
|
|
103
|
+
# @param policies [Dodopayments::Models::Customers::EmailPolicies] What you may do with this email.
|
|
104
|
+
#
|
|
105
|
+
# @param status [Symbol, Dodopayments::Models::Customers::EmailLogStatus] Where the email got to: sent, delivered, failed, complained or blocked.
|
|
106
|
+
#
|
|
107
|
+
# @param failure_code [Symbol, Dodopayments::Models::Customers::EmailFailureCode, nil] Why the email did not arrive. It is null unless the email failed.
|
|
108
|
+
#
|
|
109
|
+
# @param failure_reason [String, nil] A sentence that explains `failure_code`. It is null unless the email
|
|
110
|
+
#
|
|
111
|
+
# @param from [String, nil] The address the email was sent from.
|
|
112
|
+
#
|
|
113
|
+
# @param intended_recipient [String, nil] What the merchant typed, when test mode redirected the send to the
|
|
114
|
+
#
|
|
115
|
+
# @param recipient [String, nil] The address the email reached.
|
|
116
|
+
#
|
|
117
|
+
# @param subject [String, nil] The subject line as it was sent. Empty until the provider replicates.
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
# The delivery status of one email.
|
|
7
|
+
#
|
|
8
|
+
# `sent` also covers an email that is still on its way. A status only becomes
|
|
9
|
+
# `delivered`, `failed` or `complained` when the mail server answers.
|
|
10
|
+
module EmailLogStatus
|
|
11
|
+
extend Dodopayments::Internal::Type::Enum
|
|
12
|
+
|
|
13
|
+
SENT = :sent
|
|
14
|
+
DELIVERED = :delivered
|
|
15
|
+
FAILED = :failed
|
|
16
|
+
COMPLAINED = :complained
|
|
17
|
+
BLOCKED = :blocked
|
|
18
|
+
|
|
19
|
+
# @!method self.values
|
|
20
|
+
# @return [Array<Symbol>]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
class EmailPolicies < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute requires_different_address
|
|
8
|
+
# A permanent failure was recorded, so the same address would be a no-op.
|
|
9
|
+
#
|
|
10
|
+
# @return [Boolean]
|
|
11
|
+
required :requires_different_address, Dodopayments::Internal::Type::Boolean
|
|
12
|
+
|
|
13
|
+
# @!attribute resend_allowed
|
|
14
|
+
# The row was delivered and may be sent again.
|
|
15
|
+
#
|
|
16
|
+
# @return [Boolean]
|
|
17
|
+
required :resend_allowed, Dodopayments::Internal::Type::Boolean
|
|
18
|
+
|
|
19
|
+
# @!attribute resends_remaining
|
|
20
|
+
# How many sends are left in this email's chain.
|
|
21
|
+
#
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
required :resends_remaining, Integer
|
|
24
|
+
|
|
25
|
+
# @!attribute retry_allowed
|
|
26
|
+
# The row failed and may be sent again.
|
|
27
|
+
#
|
|
28
|
+
# @return [Boolean]
|
|
29
|
+
required :retry_allowed, Dodopayments::Internal::Type::Boolean
|
|
30
|
+
|
|
31
|
+
# @!method initialize(requires_different_address:, resend_allowed:, resends_remaining:, retry_allowed:)
|
|
32
|
+
# What the merchant may do with one row. The server decides; the client never
|
|
33
|
+
# derives eligibility itself.
|
|
34
|
+
#
|
|
35
|
+
# @param requires_different_address [Boolean] A permanent failure was recorded, so the same address would be a no-op.
|
|
36
|
+
#
|
|
37
|
+
# @param resend_allowed [Boolean] The row was delivered and may be sent again.
|
|
38
|
+
#
|
|
39
|
+
# @param resends_remaining [Integer] How many sends are left in this email's chain.
|
|
40
|
+
#
|
|
41
|
+
# @param retry_allowed [Boolean] The row failed and may be sent again.
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Customers
|
|
6
|
+
# @see Dodopayments::Resources::Customers::Emails#retrieve_body
|
|
7
|
+
class EmailRetrieveBodyParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute customer_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :customer_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute email_log_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :email_log_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(customer_id:, email_log_id:, request_options: {})
|
|
22
|
+
# @param customer_id [String]
|
|
23
|
+
# @param email_log_id [String]
|
|
24
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|