Skip to content
Open
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
31 changes: 22 additions & 9 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2436,6 +2436,7 @@ components:
- media
rbmCardContent:
type: object
description: Must contain at least one of title, description, or media to be valid.
properties:
title:
type: string
Expand Down Expand Up @@ -2478,7 +2479,6 @@ components:
$ref: '#/components/schemas/multiChannelFullActions'
required:
- orientation
- thumbnailImageAlignment
- cardContent
standaloneCardOrientationEnum:
type: string
Expand All @@ -2489,8 +2489,8 @@ components:
thumbnailAlignmentEnum:
type: string
description: >-
The alignment of the thumbnail image in the card. Only applicable if the
card using horizontal orientation.
The alignment of the thumbnail image in the card. Required when
orientation is HORIZONTAL.
enum:
- LEFT
- RIGHT
Expand All @@ -2505,6 +2505,7 @@ components:
type: array
items:
$ref: '#/components/schemas/rbmCardContent'
minItems: 2
maxItems: 10
suggestions:
$ref: '#/components/schemas/multiChannelFullActions'
Expand Down Expand Up @@ -2568,7 +2569,11 @@ components:
type: string
description: >-
Defines the layout of the WebView on a mobile device. It must be defined
when application is set to `WEBVIEW`

when application is set to `WEBVIEW` and must not be set when
application

is set to `BROWSER`.

- `FULL` WebView takes the full screen.

Expand Down Expand Up @@ -2626,12 +2631,16 @@ components:
latitude:
type: string
format: double
description: The latitude of the location.
description: >-
The latitude of the location. Must be in range [-90.000000,
90.000000].
example: '37.7749'
longitude:
type: string
format: double
description: The longitude of the location.
description: >-
The longitude of the location. Must be in range [-180.000000,
180.000000].
example: '-122.4194'
label:
type: string
Expand All @@ -2655,12 +2664,16 @@ components:
startTime:
type: string
format: date-time
description: The start time of the event.
description: >-
The start time of the event. Must be a valid RFC-3339 value,
e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.
example: 2022-09-14T18:20:16.000Z
endTime:
type: string
format: date-time
description: The end time of the event.
description: >-
The end time of the event. Must be a valid RFC-3339 value, e.g.,
2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.
example: 2022-09-14T18:20:16.000Z
description:
type: string
Expand All @@ -2680,7 +2693,7 @@ components:
url:
type: string
format: uri
description: The URL to open in browser.
description: The URL to open in browser. Must use http:// or https:// scheme.
example: https://dev.bandwidth.com
maxLength: 2048
application:
Expand Down
10 changes: 5 additions & 5 deletions docs/MultiChannelAction.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
| **text** | **String** | Displayed text for user to click | |
| **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | |
| **phone_number** | **String** | The phone number to dial. Must be E164 format. | |
| **latitude** | **Float** | The latitude of the location. | |
| **longitude** | **Float** | The longitude of the location. | |
| **latitude** | **Float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | |
| **longitude** | **Float** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | |
| **label** | **String** | The label of the location. | [optional] |
| **title** | **String** | The title of the event. | |
| **start_time** | **Time** | The start time of the event. | |
| **end_time** | **Time** | The end time of the event. | |
| **start_time** | **Time** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | |
| **end_time** | **Time** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | |
| **description** | **String** | The description of the event. | [optional] |
| **url** | **String** | The URL to open in browser. | |
| **url** | **String** | The URL to open in browser. Must use http:// or https:// scheme. | |
| **application** | [**RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] |
| **webview_view_mode** | [**RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] |

Expand Down
4 changes: 2 additions & 2 deletions docs/MultiChannelActionCalendarEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
| **text** | **String** | Displayed text for user to click | |
| **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | |
| **title** | **String** | The title of the event. | |
| **start_time** | **Time** | The start time of the event. | |
| **end_time** | **Time** | The end time of the event. | |
| **start_time** | **Time** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | |
| **end_time** | **Time** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | |
| **description** | **String** | The description of the event. | [optional] |

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/RbmActionBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require 'bandwidth-sdk'
instance = Bandwidth::RbmActionBase.new(
type: null,
text: Hello world,
postback_data: [B@1a99692
postback_data: [B@3ecbfba1
)
```

2 changes: 1 addition & 1 deletion docs/RbmActionOpenUrl.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | |
| **text** | **String** | Displayed text for user to click | |
| **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | |
| **url** | **String** | The URL to open in browser. | |
| **url** | **String** | The URL to open in browser. Must use http:// or https:// scheme. | |
| **application** | [**RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] |
| **webview_view_mode** | [**RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] |

Expand Down
4 changes: 2 additions & 2 deletions docs/RbmActionViewLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
| **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | |
| **text** | **String** | Displayed text for user to click | |
| **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | |
| **latitude** | **Float** | The latitude of the location. | |
| **longitude** | **Float** | The longitude of the location. | |
| **latitude** | **Float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | |
| **longitude** | **Float** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | |
| **label** | **String** | The label of the location. | [optional] |

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/RbmStandaloneCard.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **orientation** | [**StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | |
| **thumbnail_image_alignment** | [**ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | |
| **thumbnail_image_alignment** | [**ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] |
| **card_content** | [**RbmCardContent**](RbmCardContent.md) | | |
| **suggestions** | [**Array<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] |

Expand Down
2 changes: 1 addition & 1 deletion docs/RbmSuggestionResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require 'bandwidth-sdk'

instance = Bandwidth::RbmSuggestionResponse.new(
text: Yes, I would like to proceed,
postback_data: [B@1a99692
postback_data: [B@3ecbfba1
)
```

1 change: 0 additions & 1 deletion lib/bandwidth-sdk/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ def initialize
body = JSON.parse(response.body)
@access_token = body['access_token']
@access_token_expiration = Time.now + body['expires_in']
@access_token
}

yield(self) if block_given?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class MultiChannelActionCalendarEvent < ApiModelBase
# The title of the event.
attr_accessor :title

# The start time of the event.
# The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.
attr_accessor :start_time

# The end time of the event.
# The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.
attr_accessor :end_time

# The description of the event.
Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/models/rbm_action_open_url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RbmActionOpenUrl < ApiModelBase
# Base64 payload the customer receives when the reply is clicked.
attr_accessor :postback_data

# The URL to open in browser.
# The URL to open in browser. Must use http:// or https:// scheme.
attr_accessor :url

attr_accessor :application
Expand Down
4 changes: 2 additions & 2 deletions lib/bandwidth-sdk/models/rbm_action_view_location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class RbmActionViewLocation < ApiModelBase
# Base64 payload the customer receives when the reply is clicked.
attr_accessor :postback_data

# The latitude of the location.
# The latitude of the location. Must be in range [-90.000000, 90.000000].
attr_accessor :latitude

# The longitude of the location.
# The longitude of the location. Must be in range [-180.000000, 180.000000].
attr_accessor :longitude

# The label of the location.
Expand Down
1 change: 1 addition & 0 deletions lib/bandwidth-sdk/models/rbm_card_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
require 'time'

module Bandwidth
# Must contain at least one of title, description, or media to be valid.
class RbmCardContent < ApiModelBase
# The title of the card. Must be 200 characters or less.
attr_accessor :title
Expand Down
9 changes: 9 additions & 0 deletions lib/bandwidth-sdk/models/rbm_message_carousel_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ def list_invalid_properties
invalid_properties.push('invalid value for "card_contents", number of items must be less than or equal to 10.')
end

if @card_contents.length < 2
invalid_properties.push('invalid value for "card_contents", number of items must be greater than or equal to 2.')
end

if !@suggestions.nil? && @suggestions.length > 11
invalid_properties.push('invalid value for "suggestions", number of items must be less than or equal to 11.')
end
Expand All @@ -146,6 +150,7 @@ def valid?
return false if @card_width.nil?
return false if @card_contents.nil?
return false if @card_contents.length > 10
return false if @card_contents.length < 2
return false if !@suggestions.nil? && @suggestions.length > 11
true
end
Expand All @@ -171,6 +176,10 @@ def card_contents=(card_contents)
fail ArgumentError, 'invalid value for "card_contents", number of items must be less than or equal to 10.'
end

if card_contents.length < 2
fail ArgumentError, 'invalid value for "card_contents", number of items must be greater than or equal to 2.'
end

@card_contents = card_contents
end

Expand Down
17 changes: 0 additions & 17 deletions lib/bandwidth-sdk/models/rbm_standalone_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ def initialize(attributes = {})

if attributes.key?(:'thumbnail_image_alignment')
self.thumbnail_image_alignment = attributes[:'thumbnail_image_alignment']
else
self.thumbnail_image_alignment = nil
end

if attributes.key?(:'card_content')
Expand All @@ -132,10 +130,6 @@ def list_invalid_properties
invalid_properties.push('invalid value for "orientation", orientation cannot be nil.')
end

if @thumbnail_image_alignment.nil?
invalid_properties.push('invalid value for "thumbnail_image_alignment", thumbnail_image_alignment cannot be nil.')
end

if @card_content.nil?
invalid_properties.push('invalid value for "card_content", card_content cannot be nil.')
end
Expand All @@ -152,7 +146,6 @@ def list_invalid_properties
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
return false if @orientation.nil?
return false if @thumbnail_image_alignment.nil?
return false if @card_content.nil?
return false if !@suggestions.nil? && @suggestions.length > 11
true
Expand All @@ -168,16 +161,6 @@ def orientation=(orientation)
@orientation = orientation
end

# Custom attribute writer method with validation
# @param [Object] thumbnail_image_alignment Value to be assigned
def thumbnail_image_alignment=(thumbnail_image_alignment)
if thumbnail_image_alignment.nil?
fail ArgumentError, 'thumbnail_image_alignment cannot be nil'
end

@thumbnail_image_alignment = thumbnail_image_alignment
end

# Custom attribute writer method with validation
# @param [Object] card_content Value to be assigned
def card_content=(card_content)
Expand Down
Loading