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 .release-please-manifest.json
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
{
".": "0.23.0"
".": "0.24.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
configured_endpoints: 41
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/surge/surge-b0be84bbd2acb3b1441eedd973161e22d633387c0919c52cbecdaf964c1e5980.yml
openapi_spec_hash: 402af89d33c0accd114958a9d4fb74d2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/surge/surge-ffd563fe3318efc4a305510ec4ae66fea4a32d96ed34abd985b44692edb3535e.yml
openapi_spec_hash: fd58e5b23f677b6de74244fcf1669d8d
config_hash: 6cd48b2a1ecc5f0cf0903e70c0c6260e
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.24.0 (2026-09-04)

Full Changelog: [v0.23.0...v0.24.0](https://github.com/surgeapi/ruby-sdk/compare/v0.23.0...v0.24.0)

### Features

* **api:** add status to messages ([1a1b928](https://github.com/surgeapi/ruby-sdk/commit/1a1b9288784e37ae35e8c01f814eb39e952a24b0))
* **api:** add toll free messaging capability to accounts ([87fff80](https://github.com/surgeapi/ruby-sdk/commit/87fff8049ea378688bd2ca8df6b4f5e9919ee832))
* **api:** phone number imported webhook event ([358bf6d](https://github.com/surgeapi/ruby-sdk/commit/358bf6d5128520687260208216f8923a6c37db29))


### Documentation

* **api:** add note about links in messages for campaigns ([0b7c72d](https://github.com/surgeapi/ruby-sdk/commit/0b7c72ddf56ff3a92959ff50b484a55f62807e42))
* **api:** add note about links in messages for campaigns (continued) ([0847773](https://github.com/surgeapi/ruby-sdk/commit/0847773d88887971ec454d1ff89ac3a979ed9e0d))

## 0.23.0 (2026-08-19)

Full Changelog: [v0.22.0...v0.23.0](https://github.com/surgeapi/ruby-sdk/compare/v0.22.0...v0.23.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
surge_api (0.23.0)
surge_api (0.24.0)
cgi
connection_pool
standardwebhooks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "surge_api", "~> 0.23.0"
gem "surge_api", "~> 0.24.0"
```

<!-- x-release-please-end -->
Expand Down
1 change: 1 addition & 0 deletions lib/surge_api.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -102,6 +102,7 @@
require_relative "surge_api/models/organization"
require_relative "surge_api/models/phone_number"
require_relative "surge_api/models/phone_number_attached_to_campaign_webhook_event"
require_relative "surge_api/models/phone_number_imported_webhook_event"
require_relative "surge_api/models/phone_number_list_available_numbers_params"
require_relative "surge_api/models/phone_number_list_available_numbers_response"
require_relative "surge_api/models/phone_number_list_params"
Expand Down
2 changes: 2 additions & 0 deletions lib/surge_api/models.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -130,6 +130,8 @@ module SurgeAPI

PhoneNumberAttachedToCampaignWebhookEvent = SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent

PhoneNumberImportedWebhookEvent = SurgeAPI::Models::PhoneNumberImportedWebhookEvent

PhoneNumberListAvailableNumbersParams = SurgeAPI::Models::PhoneNumberListAvailableNumbersParams

PhoneNumberListParams = SurgeAPI::Models::PhoneNumberListParams
Expand Down
1 change: 1 addition & 0 deletions lib/surge_api/models/account_retrieve_status_params.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,7 @@ module Capability
extend SurgeAPI::Internal::Type::Enum

LOCAL_MESSAGING = :local_messaging
TOLL_FREE_MESSAGING = :toll_free_messaging

# @!method self.values
# @return [Array<Symbol>]
Expand Down
12 changes: 6 additions & 6 deletions lib/surge_api/models/campaign.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -113,11 +113,10 @@ class Campaign < SurgeAPI::Internal::Type::BaseModel
required :volume, enum: -> { SurgeAPI::Campaign::Volume }

# @!attribute link_sample
# A sample link that might be sent by this campaign. If links from other domains
# are sent through this campaign, they are much more likely to be filtered by the
# carriers. If link shortening is enabled for the account, the link shortener URL
# will be used instead of what is provided. Reach out to support if you would like
# to disable automatic link shortening.
# A sample link that might be sent by this campaign. This is required when
# `includes` contains `links`. Provide the same URL or domain that the campaign
# will use in production. If links from other domains are sent through this
# campaign, they are much more likely to be filtered by the carriers.
#
# @return [String, nil]
optional :link_sample, String
Expand DownExpand Up@@ -156,7 +155,7 @@ class Campaign < SurgeAPI::Internal::Type::BaseModel
#
# @param volume [Symbol, SurgeAPI::Models::Campaign::Volume] This will be one of the following:
#
# @param link_sample [String] A sample link that might be sent by this campaign. If links from other domains a
# @param link_sample [String] A sample link that might be sent by this campaign. This is required when `includ
#
# @param terms_and_conditions_url [String] The URL of the terms and conditions presented to end users when they opt in to m

Expand All@@ -180,6 +179,7 @@ module Status

ACTIVE = :active
CANCELED = :canceled
REJECTED = :rejected
CREATED = :created
DEACTIVATED = :deactivated
IN_REVIEW = :in_review
Expand Down
11 changes: 5 additions & 6 deletions lib/surge_api/models/campaign_params.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -122,11 +122,10 @@ class StandardCampaignParams < SurgeAPI::Internal::Type::BaseModel
-> { SurgeAPI::Internal::Type::ArrayOf[enum: SurgeAPI::CampaignParams::StandardCampaignParams::Include] }

# @!attribute link_sample
# A sample link that might be sent by this campaign. If links from other domains
# are sent through this campaign, they are much more likely to be filtered by the
# carriers. If link shortening is enabled for the account, the link shortener URL
# will be used instead of what is provided. Reach out to support if you would like
# to disable automatic link shortening.
# A sample link that might be sent by this campaign. This is required when
# `includes` contains `links`. Provide the same URL or domain that the campaign
# will use in production. If links from other domains are sent through this
# campaign, they are much more likely to be filtered by the carriers.
#
# @return [String, nil]
optional :link_sample, String
Expand All@@ -153,7 +152,7 @@ class StandardCampaignParams < SurgeAPI::Internal::Type::BaseModel
#
# @param includes [Array<Symbol, SurgeAPI::Models::CampaignParams::StandardCampaignParams::Include>] A list of properties that this campaign should include. These properties can be
#
# @param link_sample [String] A sample link that might be sent by this campaign. If links from other domains a
# @param link_sample [String] A sample link that might be sent by this campaign. This is required when `includ

module UseCase
extend SurgeAPI::Internal::Type::Enum
Expand Down
26 changes: 25 additions & 1 deletion lib/surge_api/models/message.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,13 @@ class Message < SurgeAPI::Internal::Type::BaseModel
# @return [Hash{Symbol=>String}, nil]
optional :metadata, SurgeAPI::Internal::Type::HashOf[String]

# @!method initialize(id: nil, attachments: nil, blast_id: nil, body: nil, conversation: nil, metadata: nil)
# @!attribute status
# The current status of the message.
#
# @return [Symbol, SurgeAPI::Models::Message::Status, nil]
optional :status, enum: -> { SurgeAPI::Message::Status }

# @!method initialize(id: nil, attachments: nil, blast_id: nil, body: nil, conversation: nil, metadata: nil, status: nil)
# Some parameter documentations has been truncated, see
# {SurgeAPI::Models::Message} for more details.
#
Expand All@@ -57,6 +63,8 @@ class Message < SurgeAPI::Internal::Type::BaseModel
# @param conversation [SurgeAPI::Models::Message::Conversation] A conversation with a Contact
#
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
#
# @param status [Symbol, SurgeAPI::Models::Message::Status] The current status of the message.

class Attachment < SurgeAPI::Internal::Type::BaseModel
# @!attribute id
Expand DownExpand Up@@ -185,6 +193,22 @@ module Type
end
end
end

# The current status of the message.
#
# @see SurgeAPI::Models::Message#status
module Status
extend SurgeAPI::Internal::Type::Enum

PENDING = :pending
RECEIVED = :received
SENT = :sent
DELIVERED = :delivered
FAILED = :failed

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
22 changes: 21 additions & 1 deletion lib/surge_api/models/message_delivered_webhook_event.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,6 +68,12 @@ class Data < SurgeAPI::Internal::Type::BaseModel
# @return [Hash{Symbol=>String}]
required :metadata, SurgeAPI::Internal::Type::HashOf[String]

# @!attribute status
# The message status represented by this event
#
# @return [Symbol, SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Status]
required :status, enum: -> { SurgeAPI::MessageDeliveredWebhookEvent::Data::Status }

# @!attribute attachments
# Attachments included with the message
#
Expand All@@ -82,7 +88,7 @@ class Data < SurgeAPI::Internal::Type::BaseModel
# @return [String, nil]
optional :blast_id, String

# @!method initialize(id:, body:, conversation:, delivered_at:, metadata:, attachments: nil, blast_id: nil)
# @!method initialize(id:, body:, conversation:, delivered_at:, metadata:, status:, attachments: nil, blast_id: nil)
# Some parameter documentations has been truncated, see
# {SurgeAPI::Models::MessageDeliveredWebhookEvent::Data} for more details.
#
Expand All@@ -98,6 +104,8 @@ class Data < SurgeAPI::Internal::Type::BaseModel
#
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
#
# @param status [Symbol, SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Status] The message status represented by this event
#
# @param attachments [Array<SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Attachment>] Attachments included with the message
#
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
Expand DownExpand Up@@ -132,6 +140,18 @@ class Conversation < SurgeAPI::Internal::Type::BaseModel
# @param phone_number [SurgeAPI::Models::PhoneNumber] A phone number that can be used to send and receive messages and calls
end

# The message status represented by this event
#
# @see SurgeAPI::Models::MessageDeliveredWebhookEvent::Data#status
module Status
extend SurgeAPI::Internal::Type::Enum

DELIVERED = :delivered

# @!method self.values
# @return [Array<Symbol>]
end

class Attachment < SurgeAPI::Internal::Type::BaseModel
# @!attribute id
# The unique identifier for the attachment
Expand Down
22 changes: 21 additions & 1 deletion lib/surge_api/models/message_failed_webhook_event.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,6 +74,12 @@ class Data < SurgeAPI::Internal::Type::BaseModel
# @return [Hash{Symbol=>String}]
required :metadata, SurgeAPI::Internal::Type::HashOf[String]

# @!attribute status
# The message status represented by this event
#
# @return [Symbol, SurgeAPI::Models::MessageFailedWebhookEvent::Data::Status]
required :status, enum: -> { SurgeAPI::MessageFailedWebhookEvent::Data::Status }

# @!attribute attachments
# Attachments included with the message
#
Expand All@@ -88,7 +94,7 @@ class Data < SurgeAPI::Internal::Type::BaseModel
# @return [String, nil]
optional :blast_id, String

# @!method initialize(id:, body:, conversation:, failed_at:, failure_reason:, metadata:, attachments: nil, blast_id: nil)
# @!method initialize(id:, body:, conversation:, failed_at:, failure_reason:, metadata:, status:, attachments: nil, blast_id: nil)
# Some parameter documentations has been truncated, see
# {SurgeAPI::Models::MessageFailedWebhookEvent::Data} for more details.
#
Expand All@@ -106,6 +112,8 @@ class Data < SurgeAPI::Internal::Type::BaseModel
#
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
#
# @param status [Symbol, SurgeAPI::Models::MessageFailedWebhookEvent::Data::Status] The message status represented by this event
#
# @param attachments [Array<SurgeAPI::Models::MessageFailedWebhookEvent::Data::Attachment>] Attachments included with the message
#
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
Expand DownExpand Up@@ -140,6 +148,18 @@ class Conversation < SurgeAPI::Internal::Type::BaseModel
# @param phone_number [SurgeAPI::Models::PhoneNumber] A phone number that can be used to send and receive messages and calls
end

# The message status represented by this event
#
# @see SurgeAPI::Models::MessageFailedWebhookEvent::Data#status
module Status
extend SurgeAPI::Internal::Type::Enum

FAILED = :failed

# @!method self.values
# @return [Array<Symbol>]
end

class Attachment < SurgeAPI::Internal::Type::BaseModel
# @!attribute id
# The unique identifier for the attachment
Expand Down
22 changes: 21 additions & 1 deletion lib/surge_api/models/message_received_webhook_event.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,6 +68,12 @@ class Data < SurgeAPI::Internal::Type::BaseModel
# @return [Time]
required :received_at, Time

# @!attribute status
# The message status represented by this event
#
# @return [Symbol, SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Status]
required :status, enum: -> { SurgeAPI::MessageReceivedWebhookEvent::Data::Status }

# @!attribute attachments
# Attachments included with the message
#
Expand All@@ -82,7 +88,7 @@ class Data < SurgeAPI::Internal::Type::BaseModel
# @return [String, nil]
optional :blast_id, String

# @!method initialize(id:, body:, conversation:, metadata:, received_at:, attachments: nil, blast_id: nil)
# @!method initialize(id:, body:, conversation:, metadata:, received_at:, status:, attachments: nil, blast_id: nil)
# Some parameter documentations has been truncated, see
# {SurgeAPI::Models::MessageReceivedWebhookEvent::Data} for more details.
#
Expand All@@ -98,6 +104,8 @@ class Data < SurgeAPI::Internal::Type::BaseModel
#
# @param received_at [Time] When the message was received
#
# @param status [Symbol, SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Status] The message status represented by this event
#
# @param attachments [Array<SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Attachment>] Attachments included with the message
#
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
Expand DownExpand Up@@ -132,6 +140,18 @@ class Conversation < SurgeAPI::Internal::Type::BaseModel
# @param phone_number [SurgeAPI::Models::PhoneNumber] A phone number that can be used to send and receive messages and calls
end

# The message status represented by this event
#
# @see SurgeAPI::Models::MessageReceivedWebhookEvent::Data#status
module Status
extend SurgeAPI::Internal::Type::Enum

RECEIVED = :received

# @!method self.values
# @return [Array<Symbol>]
end

class Attachment < SurgeAPI::Internal::Type::BaseModel
# @!attribute id
# The unique identifier for the attachment
Expand Down
22 changes: 21 additions & 1 deletion lib/surge_api/models/message_sent_webhook_event.rb
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,6 +68,12 @@ class Data < SurgeAPI::Internal::Type::BaseModel
# @return [Time]
required :sent_at, Time

# @!attribute status
# The message status represented by this event
#
# @return [Symbol, SurgeAPI::Models::MessageSentWebhookEvent::Data::Status]
required :status, enum: -> { SurgeAPI::MessageSentWebhookEvent::Data::Status }

# @!attribute attachments
# Attachments included with the message
#
Expand All@@ -82,7 +88,7 @@ class Data < SurgeAPI::Internal::Type::BaseModel
# @return [String, nil]
optional :blast_id, String

# @!method initialize(id:, body:, conversation:, metadata:, sent_at:, attachments: nil, blast_id: nil)
# @!method initialize(id:, body:, conversation:, metadata:, sent_at:, status:, attachments: nil, blast_id: nil)
# Some parameter documentations has been truncated, see
# {SurgeAPI::Models::MessageSentWebhookEvent::Data} for more details.
#
Expand All@@ -98,6 +104,8 @@ class Data < SurgeAPI::Internal::Type::BaseModel
#
# @param sent_at [Time] When the message was sent
#
# @param status [Symbol, SurgeAPI::Models::MessageSentWebhookEvent::Data::Status] The message status represented by this event
#
# @param attachments [Array<SurgeAPI::Models::MessageSentWebhookEvent::Data::Attachment>] Attachments included with the message
#
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
Expand DownExpand Up@@ -132,6 +140,18 @@ class Conversation < SurgeAPI::Internal::Type::BaseModel
# @param phone_number [SurgeAPI::Models::PhoneNumber] A phone number that can be used to send and receive messages and calls
end

# The message status represented by this event
#
# @see SurgeAPI::Models::MessageSentWebhookEvent::Data#status
module Status
extend SurgeAPI::Internal::Type::Enum

SENT = :sent

# @!method self.values
# @return [Array<Symbol>]
end

class Attachment < SurgeAPI::Internal::Type::BaseModel
# @!attribute id
# The unique identifier for the attachment
Expand Down
Loading