Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5abe0e44caedb3474ee672265284096ec89e0fa3
4ec19847e2d6cb16e17bd2ad2aee2bf48d86013c
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2150
v2151
4 changes: 4 additions & 0 deletions lib/stripe/event_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def self.v2_event_types_to_classes
Events::V2CoreAccountIncludingConfigurationStorerUpdatedEvent,
Events::V2CoreAccountIncludingDefaultsUpdatedEvent.lookup_type =>
Events::V2CoreAccountIncludingDefaultsUpdatedEvent,
Events::V2CoreAccountIncludingFutureRequirementsUpdatedEvent.lookup_type =>
Events::V2CoreAccountIncludingFutureRequirementsUpdatedEvent,
Events::V2CoreAccountIncludingIdentityUpdatedEvent.lookup_type =>
Events::V2CoreAccountIncludingIdentityUpdatedEvent,
Events::V2CoreAccountIncludingRequirementsUpdatedEvent.lookup_type =>
Expand Down Expand Up @@ -389,6 +391,8 @@ def self.event_notification_types_to_classes
Events::V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification,
Events::V2CoreAccountIncludingDefaultsUpdatedEventNotification.lookup_type =>
Events::V2CoreAccountIncludingDefaultsUpdatedEventNotification,
Events::V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.lookup_type =>
Events::V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification,
Events::V2CoreAccountIncludingIdentityUpdatedEventNotification.lookup_type =>
Events::V2CoreAccountIncludingIdentityUpdatedEventNotification,
Events::V2CoreAccountIncludingRequirementsUpdatedEventNotification.lookup_type =>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
module Events
# Occurs when an Account's future requirements are updated.
class V2CoreAccountIncludingFutureRequirementsUpdatedEvent < Stripe::V2::Core::Event
def self.lookup_type
"v2.core.account[future_requirements].updated"
end

# Retrieves the related object from the API. Makes an API request on every call.
def fetch_related_object
_request(
method: :get,
path: related_object.url,
base_address: :api,
opts: { stripe_context: context }
)
end
attr_reader :related_object
end

# Occurs when an Account's future requirements are updated.
class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification < Stripe::V2::Core::EventNotification
def self.lookup_type
"v2.core.account[future_requirements].updated"
end

attr_reader :related_object

# Retrieves the Account related to this EventNotification from the Stripe API. Makes an API request on every call.
def fetch_related_object
resp = @client.raw_request(
:get,
related_object.url,
opts: { stripe_context: context },
usage: ["fetch_related_object"]
)
@client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url))
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ def initialize(transition: nil)
attr_accessor :expand
# Price configuration during the trial period (amount, billing scheme, etc).
attr_accessor :price
# A brief, user-friendly name for the trial offer-for identification purposes.
attr_accessor :name

def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil)
def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil, name: nil)
@duration = duration
@end_behavior = end_behavior
@expand = expand
@price = price
@name = name
end
end
end
Expand Down
25 changes: 24 additions & 1 deletion lib/stripe/params/radar/account_evaluation_update_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,37 @@
module Stripe
module Radar
class AccountEvaluationUpdateParams < ::Stripe::RequestParams
class LoginFailed < ::Stripe::RequestParams
# The reason why this login failed.
attr_accessor :reason

def initialize(reason: nil)
@reason = reason
end
end

class RegistrationFailed < ::Stripe::RequestParams
# The reason why this registration failed.
attr_accessor :reason

def initialize(reason: nil)
@reason = reason
end
end
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# The type of event to report.
attr_accessor :type
# Event payload for login_failed.
attr_accessor :login_failed
# Event payload for registration_failed.
attr_accessor :registration_failed

def initialize(expand: nil, type: nil)
def initialize(expand: nil, type: nil, login_failed: nil, registration_failed: nil)
@expand = expand
@type = type
@login_failed = login_failed
@registration_failed = registration_failed
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,31 @@ def initialize(value: nil, currency: nil)
end

class DeliveryOptions < ::Stripe::RequestParams
# Open Enum. Method for bank account.
attr_accessor :bank_account
class PaperCheck < ::Stripe::RequestParams
# Memo printed on the memo field of the check.
attr_accessor :memo
# Open Enum. Shipping speed of the paper check. Defaults to standard.
attr_accessor :shipping_speed
# Signature for the paper check.
attr_accessor :signature

def initialize(memo: nil, shipping_speed: nil, signature: nil)
@memo = memo
@shipping_speed = shipping_speed
@signature = signature
end
end
# Open Enum. Speed of the payout.
attr_accessor :speed
# Open Enum. Method for bank account.
attr_accessor :bank_account
# Delivery options for paper check.
attr_accessor :paper_check

def initialize(bank_account: nil, speed: nil)
@bank_account = bank_account
def initialize(speed: nil, bank_account: nil, paper_check: nil)
@speed = speed
@bank_account = bank_account
@paper_check = paper_check
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def initialize(value: nil, currency: nil)
end

class DeliveryOptions < ::Stripe::RequestParams
# Open Enum. Method for bank account.
attr_accessor :bank_account
# Open Enum. Speed of the payout.
attr_accessor :speed
# Open Enum. Method for bank account.
attr_accessor :bank_account

def initialize(bank_account: nil, speed: nil)
@bank_account = bank_account
def initialize(speed: nil, bank_account: nil)
@speed = speed
@bank_account = bank_account
end
end

Expand Down
1 change: 1 addition & 0 deletions lib/stripe/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
require "stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event"
require "stripe/events/v2_core_account_including_configuration_storer_updated_event"
require "stripe/events/v2_core_account_including_defaults_updated_event"
require "stripe/events/v2_core_account_including_future_requirements_updated_event"
require "stripe/events/v2_core_account_including_identity_updated_event"
require "stripe/events/v2_core_account_including_requirements_updated_event"
require "stripe/events/v2_core_account_link_returned_event"
Expand Down
42 changes: 36 additions & 6 deletions lib/stripe/resources/delegated_checkout/requested_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,8 @@ def self.field_remappings
attr_reader :amount_discount
# The total before any discounts or taxes are applied.
attr_reader :amount_subtotal
# The description of the line item.
attr_reader :description
# The images of the line item.
attr_reader :images
# The key of the line item.
attr_reader :key
# The name of the line item.
attr_reader :name
# Attribute for field product_details
attr_reader :product_details
# The quantity of the line item.
Expand Down Expand Up @@ -355,6 +349,39 @@ def self.field_remappings
@field_remappings = {}
end
end

class RiskDetails < ::Stripe::StripeObject
class ClientDeviceMetadataDetails < ::Stripe::StripeObject
# The radar session for the client device.
attr_reader :radar_session
# The referrer of the client device.
attr_reader :referrer
# The remote IP address of the client device.
attr_reader :remote_ip
# The time spent on the page by the client device.
attr_reader :time_on_page_ms
# The user agent of the client device.
attr_reader :user_agent

def self.inner_class_types
@inner_class_types = {}
end

def self.field_remappings
@field_remappings = {}
end
end
# The risk metadata for the client device.
attr_reader :client_device_metadata_details

def self.inner_class_types
@inner_class_types = { client_device_metadata_details: ClientDeviceMetadataDetails }
end

def self.field_remappings
@field_remappings = {}
end
end
# The subtotal amount of the requested session.
attr_reader :amount_subtotal
# The total amount of the requested session.
Expand Down Expand Up @@ -399,6 +426,8 @@ def self.field_remappings
attr_reader :total_details
# Time at which the object was last updated. Measured in seconds since the Unix epoch.
attr_reader :updated_at
# The risk details of the requested session.
attr_reader :risk_details

# Confirms a requested session
def confirm(params = {}, opts = {})
Expand Down Expand Up @@ -468,6 +497,7 @@ def self.inner_class_types
payment_method_preview: PaymentMethodPreview,
seller_details: SellerDetails,
total_details: TotalDetails,
risk_details: RiskDetails,
}
end

Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/resources/product_catalog/trial_offer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def self.field_remappings
attr_reader :object
# The price during the trial offer.
attr_reader :price
# A brief, user-friendly name for the trial offer-for identification purposes.
attr_reader :name

# Creates a trial offer.
def self.create(params = {}, opts = {})
Expand Down
31 changes: 30 additions & 1 deletion lib/stripe/resources/radar/account_evaluation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,42 @@ def self.object_name
end

class Event < ::Stripe::StripeObject
class LoginFailed < ::Stripe::StripeObject
# The reason why this login failed.
attr_reader :reason

def self.inner_class_types
@inner_class_types = {}
end

def self.field_remappings
@field_remappings = {}
end
end

class RegistrationFailed < ::Stripe::StripeObject
# The reason why this registration failed.
attr_reader :reason

def self.inner_class_types
@inner_class_types = {}
end

def self.field_remappings
@field_remappings = {}
end
end
# Time at which the event occurred. Measured in seconds since the Unix epoch.
attr_reader :occurred_at
# The type of event that occurred.
attr_reader :type
# Data about a failed login event.
attr_reader :login_failed
# Data about a failed registration event.
attr_reader :registration_failed

def self.inner_class_types
@inner_class_types = {}
@inner_class_types = { login_failed: LoginFailed, registration_failed: RegistrationFailed }
end

def self.field_remappings
Expand Down
Loading