-
Notifications
You must be signed in to change notification settings - Fork 11
VAPI-3162-REFER #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
atelegu
wants to merge
12
commits into
main
Choose a base branch
from
VAPI-3162-REFER
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
VAPI-3162-REFER #211
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3961094
VAPI-3162-REFER
atelegu 63d9927
VAPI-3162-REFER
atelegu 06f9afb
VAPI-3162-REFER
atelegu 75fc16f
VAPI-3162-REFER
atelegu 51c8b79
VAPI-3162-REFER
atelegu 9d29700
VAPI-3162-REFER
atelegu b54f869
VAPI-3162-REFER
atelegu 539a192
VAPI-3162-REFER
atelegu d33a62a
VAPI-3162-REFER
atelegu be3de02
Merge branch 'main' into VAPI-3162-REFER
atelegu c367380
VAPI-3162-REFER
atelegu cbcfb9c
Merge remote-tracking branch 'origin/VAPI-3162-REFER' into VAPI-3162-…
atelegu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| module Bandwidth | ||
| module Bxml | ||
| class Refer < Bandwidth::Bxml::NestableVerb | ||
| def initialize(sip_uri, attributes = {}) | ||
| super('Refer', nil, [sip_uri], attributes) | ||
| @attribute_map = { | ||
| refer_complete_url: 'referCompleteUrl', | ||
| refer_complete_method: 'referCompleteMethod', | ||
| tag: 'tag' | ||
| } | ||
| end | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| =begin | ||
| #Bandwidth | ||
| #Bandwidth's Communication APIs | ||
| The version of the OpenAPI document: 1.0.0 | ||
| Contact: letstalk@bandwidth.com | ||
| Generated by: https://openapi-generator.tech | ||
| Generator version: 7.17.0 | ||
| =end | ||
|
|
||
| require 'date' | ||
| require 'time' | ||
|
|
||
| module Bandwidth | ||
| #BXML <Refer> verb model. Sends a SIP REFER for an inbound SIP URI call | ||
| class Refer < ApiModelBase | ||
| attr_accessor :refer_complete_url | ||
| attr_accessor :refer_complete_method | ||
| attr_accessor :tag | ||
| attr_accessor :sip_uri | ||
|
|
||
| def self.attribute_map | ||
| { | ||
| :'refer_complete_url' => :'referCompleteUrl', | ||
| :'refer_complete_method' => :'referCompleteMethod', | ||
| :'tag' => :'tag', | ||
| :'sip_uri' => :'sipUri' | ||
| } | ||
| end | ||
|
|
||
| def self.acceptable_attribute_map | ||
| attribute_map | ||
| end | ||
|
|
||
| def self.acceptable_attributes | ||
| acceptable_attribute_map.values | ||
| end | ||
|
|
||
| def self.openapi_types | ||
| { | ||
| :'refer_complete_url' => :'String', | ||
| :'refer_complete_method' => :'ReferCompleteMethodEnum', | ||
| :'tag' => :'String', | ||
| :'sip_uri' => :'SipUri' | ||
| } | ||
| end | ||
|
|
||
| def self.openapi_nullable | ||
| Set.new([:'refer_complete_url', :'refer_complete_method', :'tag']) | ||
| end | ||
|
|
||
| def initialize(attributes = {}) | ||
| raise ArgumentError, "attributes must be a Hash" unless attributes.is_a?(Hash) | ||
|
|
||
| acceptable_attribute_map = self.class.acceptable_attribute_map | ||
| attributes = attributes.each_with_object({}) do |(k, v), h| | ||
| raise ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::Refer`." unless acceptable_attribute_map.key?(k.to_sym) | ||
| h[k.to_sym] = v | ||
| end | ||
|
|
||
| self.refer_complete_url = attributes[:'refer_complete_url'] if attributes.key?(:'refer_complete_url') | ||
| self.refer_complete_method = attributes[:'refer_complete_method'] if attributes.key?(:'refer_complete_method') | ||
| self.tag = attributes[:'tag'] if attributes.key?(:'tag') | ||
| self.sip_uri = attributes[:'sip_uri'] if attributes.key?(:'sip_uri') | ||
|
|
||
| # required nested destination | ||
| raise ArgumentError, "`sip_uri` is required for Bandwidth::Refer" if self.sip_uri.nil? | ||
| # optional validation | ||
| if !self.refer_complete_method.nil? | ||
| ReferCompleteMethodEnum.build_from_hash(self.refer_complete_method) | ||
| end | ||
| if !self.tag.nil? && self.tag.length > 256 | ||
| raise ArgumentError, "`tag` max length is 256" | ||
| end | ||
| end | ||
|
|
||
| def self.build_from_hash(attributes) | ||
| return nil unless attributes.is_a?(Hash) | ||
| attributes = attributes.transform_keys(&:to_sym) | ||
| transformed_hash = {} | ||
| openapi_types.each_pair do |key, type| | ||
| if attributes.key?(attribute_map[key]) && !attributes[attribute_map[key]].nil? | ||
| transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]]) | ||
| end | ||
| end | ||
| new(transformed_hash) | ||
| end | ||
|
|
||
| def to_hash | ||
| hash = {} | ||
| self.class.attribute_map.each_pair do |attr, param| | ||
| value = send(attr) | ||
| if value.nil? | ||
| is_nullable = self.class.openapi_nullable.include?(attr) | ||
| next unless is_nullable && instance_variable_defined?(:"@#{attr}") | ||
| end | ||
| hash[param] = _to_hash(value) | ||
| end | ||
| hash | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| =begin | ||
| #Bandwidth | ||
| #Bandwidth's Communication APIs | ||
| The version of the OpenAPI document: 1.0.0 | ||
| Contact: letstalk@bandwidth.com | ||
| Generated by: https://openapi-generator.tech | ||
| Generator version: 7.17.0 | ||
| =end | ||
|
|
||
| require 'date' | ||
| require 'time' | ||
|
|
||
| module Bandwidth | ||
| class ReferCallStatusEnum | ||
| SUCCESS = "success".freeze | ||
| FAILURE = "failure".freeze | ||
|
|
||
| def self.all_vars | ||
| @all_vars ||= [SUCCESS, FAILURE].freeze | ||
| end | ||
|
|
||
| # Builds the enum from string | ||
| # @param [String] The enum value in the form of the string | ||
| # @return [String] The enum value | ||
| def self.build_from_hash(value) | ||
| new.build_from_hash(value) | ||
| end | ||
|
|
||
| # Builds the enum from string | ||
| # @param [String] The enum value in the form of the string | ||
| # @return [String] The enum value | ||
| def build_from_hash(value) | ||
| return value if ReferCallStatusEnum.all_vars.include?(value) | ||
| raise "Invalid ENUM value #{value} for class #ReferCallStatusEnum" | ||
| end | ||
| end | ||
| end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.