Skip to content

Commit

Permalink
Merge pull request #232 from lob/bugfix/fix-modules-names
Browse files Browse the repository at this point in the history
fixing issue with module names on ruby
  • Loading branch information
mrkaspa authored Feb 21, 2024
2 parents 79d049e + 175e7aa commit 2685d92
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions docs/MultipleComponents.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenapiClient::MultipleComponents
# Lob::MultipleComponents

## Properties

Expand All @@ -18,7 +18,7 @@
```ruby
require 'openapi_client'

instance = OpenapiClient::MultipleComponents.new(
instance = Lob::MultipleComponents.new(
recipient: null,
primary_line: null,
secondary_line: null,
Expand Down
4 changes: 2 additions & 2 deletions docs/UsVerification.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenapiClient::UsVerification
# Lob::UsVerification

## Properties

Expand All @@ -23,7 +23,7 @@
```ruby
require 'openapi_client'

instance = OpenapiClient::UsVerification.new(
instance = Lob::UsVerification.new(
id: null,
recipient: null,
primary_line: null,
Expand Down
4 changes: 2 additions & 2 deletions docs/UsVerificationOrError.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenapiClient::UsVerificationOrError
# Lob::UsVerificationOrError

## Properties

Expand All @@ -23,7 +23,7 @@
```ruby
require 'openapi_client'

instance = OpenapiClient::UsVerificationOrError.new(
instance = Lob::UsVerificationOrError.new(
id: null,
recipient: null,
primary_line: null,
Expand Down
4 changes: 2 additions & 2 deletions docs/UsVerifications.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenapiClient::UsVerifications
# Lob::UsVerifications

## Properties

Expand All @@ -12,7 +12,7 @@
```ruby
require 'openapi_client'

instance = OpenapiClient::UsVerifications.new(
instance = Lob::UsVerifications.new(
addresses: null,
errors: null
)
Expand Down
4 changes: 2 additions & 2 deletions docs/UsVerificationsWritable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenapiClient::UsVerificationsWritable
# Lob::UsVerificationsWritable

## Properties

Expand All @@ -19,7 +19,7 @@
```ruby
require 'openapi_client'

instance = OpenapiClient::UsVerificationsWritable.new(
instance = Lob::UsVerificationsWritable.new(
address: null,
recipient: null,
primary_line: null,
Expand Down
2 changes: 1 addition & 1 deletion lib/openapi_client.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Lob
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
The version of the OpenAPI document: 1.3.0
Contact: [email protected]
Expand Down
18 changes: 9 additions & 9 deletions lib/openapi_client/models/multiple_components.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Lob
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
The version of the OpenAPI document: 1.3.0
Contact: [email protected]
Expand All @@ -13,18 +13,18 @@
require 'date'
require 'time'

module OpenapiClient
module Lob
class MultipleComponents
# The intended recipient, typically a person's or firm's name.
attr_accessor :recipient

# The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number`
# The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number`
attr_accessor :primary_line

# The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.
# The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.
attr_accessor :secondary_line

# Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification.
# Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification.
attr_accessor :urbanization

attr_accessor :city
Expand All @@ -35,7 +35,7 @@ class MultipleComponents
# Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`).
attr_accessor :zip_code

# ID that is returned in the response body for the verification
# ID that is returned in the response body for the verification
attr_accessor :transient_id

# Attribute mapping from ruby-style variable name to JSON key.
Expand Down Expand Up @@ -82,13 +82,13 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::MultipleComponents` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::MultipleComponents` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::MultipleComponents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::MultipleComponents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down Expand Up @@ -359,7 +359,7 @@ def _deserialize(type, value)
end
else # model
# models (e.g. Pet) or oneOf
klass = OpenapiClient.const_get(type)
klass = Lob.const_get(type)
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
end
end
Expand Down
24 changes: 12 additions & 12 deletions lib/openapi_client/models/us_verification.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Lob
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
The version of the OpenAPI document: 1.3.0
Contact: [email protected]
Expand All @@ -13,30 +13,30 @@
require 'date'
require 'time'

module OpenapiClient
module Lob
class UsVerification
# Unique identifier prefixed with `us_ver_`.
attr_accessor :id

# The intended recipient, typically a person's or firm's name.
attr_accessor :recipient

# The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number`
# The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number`
attr_accessor :primary_line

# The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.
# The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.
attr_accessor :secondary_line

# Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification.
# Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification.
attr_accessor :urbanization

# Combination of the following applicable `components`: * City (`city`) * State (`state`) * ZIP code (`zip_code`) * ZIP+4 (`zip_code_plus_4`)
# Combination of the following applicable `components`: * City (`city`) * State (`state`) * ZIP code (`zip_code`) * ZIP+4 (`zip_code_plus_4`)
attr_accessor :last_line

# Summarizes the deliverability of the `us_verification` object. For full details, see the `deliverability_analysis` field. Possible values are: * `deliverable` – The address is deliverable by the USPS. * `deliverable_unnecessary_unit` – The address is deliverable, but the secondary unit information is unnecessary. * `deliverable_incorrect_unit` – The address is deliverable to the building's default address but the secondary unit provided may not exist. There is a chance the mail will not reach the intended recipient. * `deliverable_missing_unit` – The address is deliverable to the building's default address but is missing secondary unit information. There is a chance the mail will not reach the intended recipient. * `undeliverable` – The address is not deliverable according to the USPS.
# Summarizes the deliverability of the `us_verification` object. For full details, see the `deliverability_analysis` field. Possible values are: * `deliverable` – The address is deliverable by the USPS. * `deliverable_unnecessary_unit` – The address is deliverable, but the secondary unit information is unnecessary. * `deliverable_incorrect_unit` – The address is deliverable to the building's default address but the secondary unit provided may not exist. There is a chance the mail will not reach the intended recipient. * `deliverable_missing_unit` – The address is deliverable to the building's default address but is missing secondary unit information. There is a chance the mail will not reach the intended recipient. * `undeliverable` – The address is not deliverable according to the USPS.
attr_accessor :deliverability

# This field indicates whether an address was found in a more comprehensive address dataset that includes sources from the USPS, open source mapping data, and our proprietary mail delivery data. This field can be interpreted as a representation of whether an address is a real location or not. Additionally a valid address may contradict the deliverability field since an address can be a real valid location but the USPS may not deliver to that address.
# This field indicates whether an address was found in a more comprehensive address dataset that includes sources from the USPS, open source mapping data, and our proprietary mail delivery data. This field can be interpreted as a representation of whether an address is a real location or not. Additionally a valid address may contradict the deliverability field since an address can be a real valid location but the USPS may not deliver to that address.
attr_accessor :valid_address

attr_accessor :components
Expand All @@ -47,7 +47,7 @@ class UsVerification

attr_accessor :object

# ID that is returned in the response body for the verification
# ID that is returned in the response body for the verification
attr_accessor :transient_id

class EnumAttributeValidator
Expand Down Expand Up @@ -126,13 +126,13 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsVerification` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsVerification` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsVerification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsVerification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down Expand Up @@ -415,7 +415,7 @@ def _deserialize(type, value)
end
else # model
# models (e.g. Pet) or oneOf
klass = OpenapiClient.const_get(type)
klass = Lob.const_get(type)
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
end
end
Expand Down
20 changes: 10 additions & 10 deletions lib/openapi_client/models/us_verification_or_error.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Lob
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
The version of the OpenAPI document: 1.3.0
Contact: [email protected]
Expand All @@ -13,22 +13,22 @@
require 'date'
require 'time'

module OpenapiClient
# A model used to represent an entry in a result list where the entry can either be a us_verification or an Error. The SDK will perform necessary casting into the correct corresponding type.
module Lob
# A model used to represent an entry in a result list where the entry can either be a us_verification or an Error. The SDK will perform necessary casting into the correct corresponding type.
class UsVerificationOrError
# Unique identifier prefixed with `us_ver_`.
attr_accessor :id

# The intended recipient, typically a person's or firm's name.
attr_accessor :recipient

# The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number`
# The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number`
attr_accessor :primary_line

# The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.
# The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.
attr_accessor :secondary_line

# Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification.
# Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification.
attr_accessor :urbanization

attr_accessor :last_line
Expand All @@ -43,7 +43,7 @@ class UsVerificationOrError

attr_accessor :object

# ID that is returned in the response body for the verification
# ID that is returned in the response body for the verification
attr_accessor :transient_id

attr_accessor :error
Expand Down Expand Up @@ -124,13 +124,13 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsVerificationOrError` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsVerificationOrError` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsVerificationOrError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsVerificationOrError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down Expand Up @@ -413,7 +413,7 @@ def _deserialize(type, value)
end
else # model
# models (e.g. Pet) or oneOf
klass = OpenapiClient.const_get(type)
klass = Lob.const_get(type)
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
end
end
Expand Down
Loading

0 comments on commit 2685d92

Please sign in to comment.