├── .openapi-generator └── VERSION ├── .rspec ├── Gemfile ├── Rakefile ├── docs ├── MailType.md ├── ChkUseType.md ├── CmpUseType.md ├── EngineHtml.md ├── LtrUseType.md ├── PscUseType.md ├── SfmUseType.md ├── SnpUseType.md ├── DpvFootnote.md ├── UploadState.md ├── ZipCodeType.md ├── BankTypeEnum.md ├── PostcardSize.md ├── SnapPackSize.md ├── CmpScheduleType.md ├── CountryExtended.md ├── SelfMailerSize.md ├── CountryExtendedExpanded.md ├── CountryExtendedExpandedNoUs.md ├── ExportModel.md ├── InlineObject.md ├── CardOrderEditable.md ├── ZipEditable.md ├── BulkError.md ├── HTTPValidationError.md ├── SortBy.md ├── SortBy1.md ├── SortBy2.md ├── SortBy3.md ├── SortBy4.md ├── BuckslipOrderEditable.md ├── MultipleComponentsList.md ├── IntlVerificationsPayload.md ├── UploadFile.md ├── GeocodeComponents.md ├── SortByDateModified.md ├── UploadsMetadata.md ├── UploadCreateExport.md ├── BillingGroupEditable.md ├── ValidationError.md ├── CampaignDeletion.md ├── GeocodeAddresses.md ├── BuckslipDeletion.md ├── BulkErrorProperties.md ├── UsVerifications.md ├── IntlVerifications.md ├── PostcardDetailsWritable.md ├── BankAccountVerify.md ├── CustomEnvelopeReturned.md ├── IntlAutocompletions.md ├── TemplateUpdate.md ├── TemplateVersionUpdatable.md ├── LetterCustomEnvelope.md ├── LobError.md ├── CardDeletion.md ├── CheckDeletion.md ├── LetterDeletion.md ├── AddressDeletion.md ├── CardUpdatable.md ├── ReturnEnvelope.md ├── PostcardDeletion.md ├── SnapPackDeletion.md ├── EventType.md ├── BuckslipUpdatable.md ├── SelfMailerDeletion.md ├── BankAccountDeletion.md ├── ReverseGeocode.md ├── TemplateVersionDeletion.md ├── UsAutocompletions.md ├── LocationAnalysis.md ├── TemplateDeletion.md ├── BuckslipEditable.md ├── CardEditable.md ├── CardOrderList.md ├── Location.md ├── BillingGroupList.md ├── IntlComponents.md ├── BuckslipOrdersList.md ├── PostcardDetailsReturned.md ├── Zip.md ├── OptionalAddressColumnMapping.md ├── BillingGroup.md ├── CardList.md ├── CheckList.md ├── LetterList.md ├── AddressList.md ├── BuckslipsList.md ├── CampaignsList.md ├── PostcardList.md ├── SnapPackList.md ├── TemplateList.md ├── SelfMailerList.md ├── BankAccountList.md ├── TemplateVersionList.md ├── Thumbnail.md ├── IntlAutocompletionsWritable.md ├── PlaceholderModel.md ├── UsAutocompletionsWritable.md ├── CreativePatch.md ├── MultipleComponentsIntl.md ├── ZipLookupCity.md ├── QrCode.md ├── Suggestions.md ├── Export.md ├── RequiredAddressColumnMapping.md ├── LobConfidenceScore.md ├── IntlVerificationWritable.md ├── IntlSuggestions.md ├── IntlVerificationOrError.md ├── Events.md ├── BankAccountWritable.md ├── LetterDetailsWritable.md ├── TemplateVersionWritable.md ├── LetterDetailsReturned.md ├── UploadWritable.md ├── CardOrder.md ├── UploadUpdatable.md ├── BuckslipOrder.md ├── DefaultApi.md ├── CreativeWritable.md ├── Template.md ├── ZipLookupsApi.md ├── CampaignUpdatable.md ├── CampaignWritable.md ├── TemplateWritable.md ├── AddressEditable.md ├── MultipleComponents.md ├── MultiLineAddress.md ├── IdentityValidationApi.md ├── Card.md ├── TrackingEventCertified.md ├── AddressDomestic.md ├── AddressDomesticExpanded.md ├── UsVerificationsWritable.md ├── UsVerificationOrError.md ├── CampaignCreative.md ├── CreativeResponse.md ├── Buckslip.md └── BankAccount.md ├── lib └── lob │ ├── version.rb │ ├── models │ ├── snap_pack_size.rb │ ├── cmp_schedule_type.rb │ ├── engine_html.rb │ ├── mail_type.rb │ ├── bank_type_enum.rb │ ├── postcard_size.rb │ ├── chk_use_type.rb │ ├── cmp_use_type.rb │ ├── ltr_use_type.rb │ ├── psc_use_type.rb │ ├── sfm_use_type.rb │ ├── snp_use_type.rb │ ├── zip_code_type.rb │ ├── self_mailer_size.rb │ ├── upload_state.rb │ └── dpv_footnote.rb │ └── api_error.rb ├── __tests__ ├── Api │ ├── Require.unit.rb │ ├── ZipLookup.unit.rb │ ├── ReverseGeocodeLookup.unit.rb │ ├── UsAutocompletion.unit.rb │ └── IntlAutocompletion.unit.rb ├── Integration │ ├── ZipLookup.spec.rb │ ├── ReverseGeocodeLookup.spec.rb │ ├── UsAutocompletion.spec.rb │ └── IntlAutocompletion.spec.rb └── TestFixtures.rb ├── .github └── workflows │ ├── update_gem.yml │ └── run_tests.yml ├── .gitignore ├── LICENSE ├── .openapi-generator-ignore ├── spec ├── configuration_spec.rb └── api │ ├── zip_lookups_api_spec.rb │ ├── default_api_spec.rb │ ├── identity_validation_api_spec.rb │ ├── reverse_geocode_lookups_api_spec.rb │ ├── us_autocompletions_api_spec.rb │ ├── intl_autocompletions_api_spec.rb │ ├── card_orders_api_spec.rb │ ├── buckslip_orders_api_spec.rb │ ├── intl_verifications_api_spec.rb │ └── us_verifications_api_spec.rb ├── lob.gemspec └── git_push.sh /.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 5.2.1 -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec 4 | 5 | group :development, :test do 6 | gem 'rake', '~> 13.0.1' 7 | gem 'pry-byebug' 8 | gem 'rubocop', '~> 0.66.0' 9 | end 10 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | 3 | begin 4 | require 'rspec/core/rake_task' 5 | 6 | RSpec::Core::RakeTask.new(:spec) 7 | task default: :spec 8 | rescue LoadError 9 | # no rspec available 10 | end 11 | -------------------------------------------------------------------------------- /docs/MailType.md: -------------------------------------------------------------------------------- 1 | # Lob::MailType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::MailType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/ChkUseType.md: -------------------------------------------------------------------------------- 1 | # Lob::ChkUseType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::ChkUseType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/CmpUseType.md: -------------------------------------------------------------------------------- 1 | # Lob::CmpUseType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::CmpUseType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/EngineHtml.md: -------------------------------------------------------------------------------- 1 | # Lob::EngineHtml 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::EngineHtml.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/LtrUseType.md: -------------------------------------------------------------------------------- 1 | # Lob::LtrUseType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::LtrUseType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/PscUseType.md: -------------------------------------------------------------------------------- 1 | # Lob::PscUseType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::PscUseType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/SfmUseType.md: -------------------------------------------------------------------------------- 1 | # Lob::SfmUseType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::SfmUseType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/SnpUseType.md: -------------------------------------------------------------------------------- 1 | # Lob::SnpUseType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::SnpUseType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/DpvFootnote.md: -------------------------------------------------------------------------------- 1 | # Lob::DpvFootnote 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::DpvFootnote.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/UploadState.md: -------------------------------------------------------------------------------- 1 | # Lob::UploadState 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::UploadState.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/ZipCodeType.md: -------------------------------------------------------------------------------- 1 | # Lob::ZipCodeType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::ZipCodeType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/BankTypeEnum.md: -------------------------------------------------------------------------------- 1 | # Lob::BankTypeEnum 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::BankTypeEnum.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/PostcardSize.md: -------------------------------------------------------------------------------- 1 | # Lob::PostcardSize 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::PostcardSize.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/SnapPackSize.md: -------------------------------------------------------------------------------- 1 | # Lob::SnapPackSize 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::SnapPackSize.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/CmpScheduleType.md: -------------------------------------------------------------------------------- 1 | # Lob::CmpScheduleType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::CmpScheduleType.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/CountryExtended.md: -------------------------------------------------------------------------------- 1 | # Lob::CountryExtended 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::CountryExtended.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/SelfMailerSize.md: -------------------------------------------------------------------------------- 1 | # Lob::SelfMailerSize 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::SelfMailerSize.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/CountryExtendedExpanded.md: -------------------------------------------------------------------------------- 1 | # Lob::CountryExtendedExpanded 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::CountryExtendedExpanded.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/CountryExtendedExpandedNoUs.md: -------------------------------------------------------------------------------- 1 | # Lob::CountryExtendedExpandedNoUs 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | 8 | ## Example 9 | 10 | ```ruby 11 | require 'lob' 12 | 13 | instance = Lob::CountryExtendedExpandedNoUs.new() 14 | ``` 15 | 16 | -------------------------------------------------------------------------------- /docs/ExportModel.md: -------------------------------------------------------------------------------- 1 | # Lob::ExportModel 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **type** | **String** | | [optional] | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::ExportModel.new( 15 | type: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/InlineObject.md: -------------------------------------------------------------------------------- 1 | # Lob::InlineObject 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **file** | [**AnyType**](.md) | | | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::InlineObject.new( 15 | file: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/CardOrderEditable.md: -------------------------------------------------------------------------------- 1 | # Lob::CardOrderEditable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **quantity** | **Integer** | | | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::CardOrderEditable.new( 15 | quantity: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/ZipEditable.md: -------------------------------------------------------------------------------- 1 | # Lob::ZipEditable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **zip_code** | **String** | A 5-digit ZIP code. | [optional] | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::ZipEditable.new( 15 | zip_code: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/BulkError.md: -------------------------------------------------------------------------------- 1 | # Lob::BulkError 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **error** | [**BulkErrorProperties**](BulkErrorProperties.md) | | [optional] | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::BulkError.new( 15 | error: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/HTTPValidationError.md: -------------------------------------------------------------------------------- 1 | # Lob::HTTPValidationError 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **detail** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::HTTPValidationError.new( 15 | detail: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/SortBy.md: -------------------------------------------------------------------------------- 1 | # Lob::SortBy 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **date_created** | **String** | | [optional] | 8 | | **send_date** | **String** | | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::SortBy.new( 16 | date_created: null, 17 | send_date: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/SortBy1.md: -------------------------------------------------------------------------------- 1 | # Lob::SortBy1 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **date_created** | **String** | | [optional] | 8 | | **send_date** | **String** | | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::SortBy1.new( 16 | date_created: null, 17 | send_date: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/SortBy2.md: -------------------------------------------------------------------------------- 1 | # Lob::SortBy2 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **date_created** | **String** | | [optional] | 8 | | **send_date** | **String** | | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::SortBy2.new( 16 | date_created: null, 17 | send_date: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/SortBy3.md: -------------------------------------------------------------------------------- 1 | # Lob::SortBy3 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **date_created** | **String** | | [optional] | 8 | | **send_date** | **String** | | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::SortBy3.new( 16 | date_created: null, 17 | send_date: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/SortBy4.md: -------------------------------------------------------------------------------- 1 | # Lob::SortBy4 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **date_created** | **String** | | [optional] | 8 | | **send_date** | **String** | | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::SortBy4.new( 16 | date_created: null, 17 | send_date: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/BuckslipOrderEditable.md: -------------------------------------------------------------------------------- 1 | # Lob::BuckslipOrderEditable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **quantity** | **Integer** | The quantity of buckslips in the order (minimum 5,000). | | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::BuckslipOrderEditable.new( 15 | quantity: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/MultipleComponentsList.md: -------------------------------------------------------------------------------- 1 | # Lob::MultipleComponentsList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **addresses** | [**Array<MultipleComponents>**](MultipleComponents.md) | | | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::MultipleComponentsList.new( 15 | addresses: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/IntlVerificationsPayload.md: -------------------------------------------------------------------------------- 1 | # Lob::IntlVerificationsPayload 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **addresses** | [**Array<MultipleComponentsIntl>**](MultipleComponentsIntl.md) | | | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::IntlVerificationsPayload.new( 15 | addresses: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/UploadFile.md: -------------------------------------------------------------------------------- 1 | # Lob::UploadFile 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **message** | **String** | | [default to 'File uploaded successfully'] | 8 | | **filename** | **String** | | | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::UploadFile.new( 16 | message: null, 17 | filename: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/GeocodeComponents.md: -------------------------------------------------------------------------------- 1 | # Lob::GeocodeComponents 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **zip_code** | **String** | The 5-digit ZIP code | | 8 | | **zip_code_plus_4** | **String** | | | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::GeocodeComponents.new( 16 | zip_code: null, 17 | zip_code_plus_4: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/SortByDateModified.md: -------------------------------------------------------------------------------- 1 | # Lob::SortByDateModified 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **date_created** | **String** | | [optional] | 8 | | **date_modified** | **String** | | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::SortByDateModified.new( 16 | date_created: null, 17 | date_modified: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/UploadsMetadata.md: -------------------------------------------------------------------------------- 1 | # Lob::UploadsMetadata 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **columns** | **Array<String>** | The list of column names from the csv file which you want associated with each of your mailpieces | | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::UploadsMetadata.new( 15 | columns: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/UploadCreateExport.md: -------------------------------------------------------------------------------- 1 | # Lob::UploadCreateExport 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **message** | **String** | | [default to 'Export is processing.'] | 8 | | **export_id** | **String** | | | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::UploadCreateExport.new( 16 | message: null, 17 | export_id: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/BillingGroupEditable.md: -------------------------------------------------------------------------------- 1 | # Lob::BillingGroupEditable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | Description of the billing group. | [optional] | 8 | | **name** | **String** | Name of the billing group. | | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::BillingGroupEditable.new( 16 | description: null, 17 | name: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/ValidationError.md: -------------------------------------------------------------------------------- 1 | # Lob::ValidationError 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **loc** | [**Array<AnyOfstringinteger>**](AnyOfstringinteger.md) | | | 8 | | **msg** | **String** | | | 9 | | **type** | **String** | | | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::ValidationError.new( 17 | loc: null, 18 | msg: null, 19 | type: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/CampaignDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::CampaignDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `cmp_`. | [optional] | 8 | | **deleted** | **Boolean** | True if the resource has been successfully deleted. | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::CampaignDeletion.new( 16 | id: null, 17 | deleted: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/GeocodeAddresses.md: -------------------------------------------------------------------------------- 1 | # Lob::GeocodeAddresses 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **components** | [**GeocodeComponents**](GeocodeComponents.md) | | [optional] | 8 | | **location_analysis** | [**LocationAnalysis**](LocationAnalysis.md) | | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::GeocodeAddresses.new( 16 | components: null, 17 | location_analysis: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /lib/lob/version.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | module Lob 14 | VERSION = '6.0.9' 15 | end 16 | -------------------------------------------------------------------------------- /docs/BuckslipDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::BuckslipDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `bck_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::BuckslipDeletion.new( 16 | id: null, 17 | deleted: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/BulkErrorProperties.md: -------------------------------------------------------------------------------- 1 | # Lob::BulkErrorProperties 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **message** | **String** | A human-readable message with more details about the error | [optional] | 8 | | **status_code** | **Integer** | A conventional HTTP status code. | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::BulkErrorProperties.new( 16 | message: null, 17 | status_code: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/UsVerifications.md: -------------------------------------------------------------------------------- 1 | # Lob::UsVerifications 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **addresses** | [**Array<UsVerificationOrError>**](UsVerificationOrError.md) | | | 8 | | **errors** | **Boolean** | Indicates whether any errors occurred during the verification process. | | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::UsVerifications.new( 16 | addresses: null, 17 | errors: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/IntlVerifications.md: -------------------------------------------------------------------------------- 1 | # Lob::IntlVerifications 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **addresses** | [**Array<IntlVerificationOrError>**](IntlVerificationOrError.md) | | | 8 | | **errors** | **Boolean** | Indicates whether any errors occurred during the verification process. | | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::IntlVerifications.new( 16 | addresses: null, 17 | errors: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/PostcardDetailsWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::PostcardDetailsWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **mail_type** | [**MailType**](MailType.md) | | [optional][default to 'usps_first_class'] | 8 | | **size** | [**PostcardSize**](PostcardSize.md) | | [optional][default to '4x6'] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::PostcardDetailsWritable.new( 16 | mail_type: null, 17 | size: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/BankAccountVerify.md: -------------------------------------------------------------------------------- 1 | # Lob::BankAccountVerify 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **amounts** | **Array<Integer>** | In live mode, an array containing the two micro deposits (in cents) placed in the bank account. In test mode, no micro deposits will be placed, so any two integers between `1` and `100` will work. | | 8 | 9 | ## Example 10 | 11 | ```ruby 12 | require 'lob' 13 | 14 | instance = Lob::BankAccountVerify.new( 15 | amounts: null 16 | ) 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/CustomEnvelopeReturned.md: -------------------------------------------------------------------------------- 1 | # Lob::CustomEnvelopeReturned 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | The unique identifier of the custom envelope used. | | 8 | | **url** | **String** | The url of the envelope asset used. | | 9 | | **object** | **String** | | [default to 'envelope'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::CustomEnvelopeReturned.new( 17 | id: null, 18 | url: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/IntlAutocompletions.md: -------------------------------------------------------------------------------- 1 | # Lob::IntlAutocompletions 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `intl_auto_`. | [optional] | 8 | | **suggestions** | [**Array<IntlSuggestions>**](IntlSuggestions.md) | An array of objects representing suggested addresses. | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::IntlAutocompletions.new( 16 | id: null, 17 | suggestions: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/TemplateUpdate.md: -------------------------------------------------------------------------------- 1 | # Lob::TemplateUpdate 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 8 | | **published_version** | **String** | Unique identifier prefixed with `vrsn_`. | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::TemplateUpdate.new( 16 | description: null, 17 | published_version: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/TemplateVersionUpdatable.md: -------------------------------------------------------------------------------- 1 | # Lob::TemplateVersionUpdatable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 8 | | **engine** | [**EngineHtml**](EngineHtml.md) | | [optional][default to 'legacy'] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::TemplateVersionUpdatable.new( 16 | description: null, 17 | engine: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/LetterCustomEnvelope.md: -------------------------------------------------------------------------------- 1 | # Lob::LetterCustomEnvelope 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | The unique identifier of the custom envelope used. | [optional] | 8 | | **url** | **String** | The url of the envelope asset used. | [optional] | 9 | | **object** | **String** | | [optional][default to 'envelope'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::LetterCustomEnvelope.new( 17 | id: null, 18 | url: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/LobError.md: -------------------------------------------------------------------------------- 1 | # Lob::LobError 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **message** | **String** | A human-readable message with more details about the error | [optional] | 8 | | **status_code** | **Integer** | A conventional HTTP status code. | [optional] | 9 | | **code** | **String** | A pre-defined string identifying an error. | [optional] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::LobError.new( 17 | message: null, 18 | status_code: null, 19 | code: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/CardDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::CardDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `card_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'card_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::CardDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/CheckDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::CheckDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `chk_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'check_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::CheckDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/LetterDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::LetterDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `ltr_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'letter_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::LetterDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/AddressDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::AddressDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `adr_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'address_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::AddressDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/CardUpdatable.md: -------------------------------------------------------------------------------- 1 | # Lob::CardUpdatable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | Description of the card. | [optional] | 8 | | **auto_reorder** | **Boolean** | Allows for auto reordering | [optional] | 9 | | **reorder_quantity** | **Float** | The quantity of items to be reordered (only required when auto_reorder is true). | [optional] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::CardUpdatable.new( 17 | description: null, 18 | auto_reorder: null, 19 | reorder_quantity: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/ReturnEnvelope.md: -------------------------------------------------------------------------------- 1 | # Lob::ReturnEnvelope 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | The unique ID of the Return Envelope | [optional] | 8 | | **_alias** | **String** | A quick reference name for the Return Envelope | [optional] | 9 | | **url** | **String** | The url of the return envelope | [optional] | 10 | | **object** | **String** | | [optional] | 11 | 12 | ## Example 13 | 14 | ```ruby 15 | require 'lob' 16 | 17 | instance = Lob::ReturnEnvelope.new( 18 | id: null, 19 | _alias: null, 20 | url: null, 21 | object: null 22 | ) 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /docs/PostcardDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::PostcardDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `psc_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'postcard_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::PostcardDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/SnapPackDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::SnapPackDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `ord_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'snap_pack_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::SnapPackDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/EventType.md: -------------------------------------------------------------------------------- 1 | # Lob::EventType 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | | | 8 | | **enabled_for_test** | **Boolean** | Value is `true` if the event type is enabled in both the test and live environments. | | 9 | | **resource** | **String** | | | 10 | | **object** | **String** | Value is resource type. | [default to 'event_type'] | 11 | 12 | ## Example 13 | 14 | ```ruby 15 | require 'lob' 16 | 17 | instance = Lob::EventType.new( 18 | id: null, 19 | enabled_for_test: null, 20 | resource: null, 21 | object: null 22 | ) 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /docs/BuckslipUpdatable.md: -------------------------------------------------------------------------------- 1 | # Lob::BuckslipUpdatable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | Description of the buckslip. | [optional] | 8 | | **auto_reorder** | **Boolean** | Allows for auto reordering | [optional] | 9 | | **reorder_quantity** | **Float** | The quantity of items to be reordered (only required when auto_reorder is true). | [optional] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::BuckslipUpdatable.new( 17 | description: null, 18 | auto_reorder: null, 19 | reorder_quantity: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/SelfMailerDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::SelfMailerDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `sfm_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'self_mailer_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::SelfMailerDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/BankAccountDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::BankAccountDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `bank_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'bank_account_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::BankAccountDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/ReverseGeocode.md: -------------------------------------------------------------------------------- 1 | # Lob::ReverseGeocode 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `us_reverse_geocode_`. | [optional] | 8 | | **addresses** | [**Array<GeocodeAddresses>**](GeocodeAddresses.md) | list of addresses | [optional] | 9 | | **object** | **String** | Value is resource type. | [optional][default to 'us_reverse_geocode_lookup'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::ReverseGeocode.new( 17 | id: null, 18 | addresses: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/TemplateVersionDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::TemplateVersionDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `vrsn_`. | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'template_version_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::TemplateVersionDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /__tests__/Api/Require.unit.rb: -------------------------------------------------------------------------------- 1 | # Require.unit.rb 2 | 3 | RSpec.describe "Require" do 4 | it "works with lob.rb" do 5 | Object.send :remove_const, :Lob 6 | paths = $".select do |path| 7 | path.include?(File.expand_path("../../lib", File.dirname(__FILE__))) 8 | end 9 | paths.each { |path| $".delete(path) } 10 | 11 | expect(defined?(Lob)).to eq(nil) 12 | expect(defined?(Lob::Configuration)).to eq(nil) 13 | 14 | require "lob" 15 | 16 | expect(defined?(Lob)).to eq("constant") 17 | expect(defined?(Lob::Configuration)).to eq("constant") 18 | end 19 | 20 | end 21 | -------------------------------------------------------------------------------- /docs/UsAutocompletions.md: -------------------------------------------------------------------------------- 1 | # Lob::UsAutocompletions 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `us_auto_`. | [optional] | 8 | | **suggestions** | [**Array<Suggestions>**](Suggestions.md) | An array of objects representing suggested addresses. | [optional] | 9 | | **object** | **String** | Value is resource type. | [optional][default to 'us_autocompletion'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::UsAutocompletions.new( 17 | id: null, 18 | suggestions: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/LocationAnalysis.md: -------------------------------------------------------------------------------- 1 | # Lob::LocationAnalysis 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **latitude** | **Float** | A positive or negative decimal indicating the geographic latitude of the address. | | 8 | | **longitude** | **Float** | A positive or negative decimal indicating the geographic longitude of the address. | | 9 | | **distance** | **Float** | The distance from the input location to this exact zip code in miles. | | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::LocationAnalysis.new( 17 | latitude: null, 18 | longitude: null, 19 | distance: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/TemplateDeletion.md: -------------------------------------------------------------------------------- 1 | # Lob::TemplateDeletion 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `tmpl_`. ID of a saved [HTML template](#section/HTML-Templates). | [optional] | 8 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 9 | | **object** | **String** | Value is type of resource. | [optional][default to 'template_deleted'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::TemplateDeletion.new( 17 | id: null, 18 | deleted: null, 19 | object: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/BuckslipEditable.md: -------------------------------------------------------------------------------- 1 | # Lob::BuckslipEditable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **front** | **String** | A PDF template for the front of the buckslip | | 8 | | **back** | **String** | A PDF template for the back of the buckslip | [optional] | 9 | | **description** | **String** | Description of the buckslip. | [optional] | 10 | | **size** | **String** | The size of the buckslip | [optional][default to '8.75x3.75'] | 11 | 12 | ## Example 13 | 14 | ```ruby 15 | require 'lob' 16 | 17 | instance = Lob::BuckslipEditable.new( 18 | front: null, 19 | back: null, 20 | description: null, 21 | size: null 22 | ) 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /.github/workflows/update_gem.yml: -------------------------------------------------------------------------------- 1 | name: Publish Gem 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | jobs: 8 | publish_gem: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | - name: Setup 13 | uses: ruby/setup-ruby@v1 14 | with: 15 | ruby-version: 2.7 16 | - name: Install Dependencies 17 | run: bundle install 18 | - name: Publish Gem 19 | run: | 20 | mkdir -p $HOME/.gem 21 | touch $HOME/.gem/credentials 22 | chmod 0600 $HOME/.gem/credentials 23 | printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials 24 | gem build *.gemspec 25 | gem push *.gem 26 | env: 27 | GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" 28 | -------------------------------------------------------------------------------- /docs/CardEditable.md: -------------------------------------------------------------------------------- 1 | # Lob::CardEditable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **front** | **String** | A PDF template for the front of the card | | 8 | | **back** | **String** | A PDF template for the back of the card | [optional][default to 'https://s3.us-west-2.amazonaws.com/public.lob.com/assets/card_blank_horizontal.pdf'] | 9 | | **size** | **String** | The size of the card | [optional][default to '2.125x3.375'] | 10 | | **description** | **String** | Description of the card. | [optional] | 11 | 12 | ## Example 13 | 14 | ```ruby 15 | require 'lob' 16 | 17 | instance = Lob::CardEditable.new( 18 | front: null, 19 | back: null, 20 | size: null, 21 | description: null 22 | ) 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /docs/CardOrderList.md: -------------------------------------------------------------------------------- 1 | # Lob::CardOrderList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<CardOrder>**](CardOrder.md) | list of card orders | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::CardOrderList.new( 19 | data: null, 20 | object: null, 21 | next_url: null, 22 | previous_url: null, 23 | count: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/Location.md: -------------------------------------------------------------------------------- 1 | # Lob::Location 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **latitude** | **Float** | A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be input with `longitude` to pinpoint locations on a map. | | 8 | | **longitude** | **Float** | A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be input with `latitude` to pinpoint locations on a map. | | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::Location.new( 16 | latitude: null, 17 | longitude: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /docs/BillingGroupList.md: -------------------------------------------------------------------------------- 1 | # Lob::BillingGroupList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<BillingGroup>**](BillingGroup.md) | list of billing groups | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::BillingGroupList.new( 19 | data: null, 20 | object: null, 21 | next_url: null, 22 | previous_url: null, 23 | count: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by: https://openapi-generator.tech 2 | # 3 | 4 | *.gem 5 | *.rbc 6 | /.config 7 | /coverage/ 8 | /InstalledFiles 9 | /pkg/ 10 | /spec/reports/ 11 | /spec/examples.txt 12 | /test/tmp/ 13 | /test/version_tmp/ 14 | /tmp/ 15 | 16 | ## Specific to RubyMotion: 17 | .dat* 18 | .repl_history 19 | build/ 20 | 21 | ## Documentation cache and generated files: 22 | /.yardoc/ 23 | /_yardoc/ 24 | /doc/ 25 | /rdoc/ 26 | 27 | ## Environment normalization: 28 | /.bundle/ 29 | /vendor/bundle 30 | /lib/bundler/man/ 31 | 32 | # for a library or gem, you might want to ignore these files since the code is 33 | # intended to run in multiple environments; otherwise, check them in: 34 | # Gemfile.lock 35 | # .ruby-version 36 | # .ruby-gemset 37 | 38 | # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: 39 | .rvmrc 40 | .env 41 | -------------------------------------------------------------------------------- /docs/IntlComponents.md: -------------------------------------------------------------------------------- 1 | # Lob::IntlComponents 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **primary_number** | **String** | The numeric or alphanumeric part of an address preceding the street name. Often the house, building, or PO Box number. | [optional] | 8 | | **street_name** | **String** | The name of the street. | [optional] | 9 | | **city** | **String** | | [optional] | 10 | | **state** | **String** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) two letter code for the state. | [optional] | 11 | | **postal_code** | **String** | The postal code. | [optional] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::IntlComponents.new( 19 | primary_number: null, 20 | street_name: null, 21 | city: null, 22 | state: null, 23 | postal_code: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/BuckslipOrdersList.md: -------------------------------------------------------------------------------- 1 | # Lob::BuckslipOrdersList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **object** | **String** | Value is type of resource. | [optional] | 8 | | **next_url** | **String** | Url of next page of items in list. | [optional] | 9 | | **previous_url** | **String** | Url of previous page of items in list. | [optional] | 10 | | **count** | **Integer** | number of resources in a set | [optional] | 11 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::BuckslipOrdersList.new( 19 | object: null, 20 | next_url: null, 21 | previous_url: null, 22 | count: null, 23 | total_count: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/PostcardDetailsReturned.md: -------------------------------------------------------------------------------- 1 | # Lob::PostcardDetailsReturned 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **mail_type** | [**MailType**](MailType.md) | | [optional][default to 'usps_first_class'] | 8 | | **size** | [**PostcardSize**](PostcardSize.md) | | [optional][default to '4x6'] | 9 | | **setting** | **Integer** | | [optional][default to 1001] | 10 | | **front_original_url** | **String** | The original URL of the front template. | [optional] | 11 | | **back_original_url** | **String** | The original URL of the back template. | [optional] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::PostcardDetailsReturned.new( 19 | mail_type: null, 20 | size: null, 21 | setting: null, 22 | front_original_url: null, 23 | back_original_url: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/Zip.md: -------------------------------------------------------------------------------- 1 | # Lob::Zip 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **zip_code** | **String** | A 5-digit ZIP code. | [optional] | 8 | | **id** | **String** | Unique identifier prefixed with `us_zip_`. | | 9 | | **cities** | [**Array<ZipLookupCity>**](ZipLookupCity.md) | An array of city objects containing valid cities for the `zip_code`. Multiple cities will be returned if more than one city is associated with the input ZIP code. | | 10 | | **zip_code_type** | [**ZipCodeType**](ZipCodeType.md) | | | 11 | | **object** | **String** | | [default to 'us_zip_lookup'] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::Zip.new( 19 | zip_code: null, 20 | id: null, 21 | cities: null, 22 | zip_code_type: null, 23 | object: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/OptionalAddressColumnMapping.md: -------------------------------------------------------------------------------- 1 | # Lob::OptionalAddressColumnMapping 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **address_line2** | **String** | The column header from the csv file that should be mapped to the optional field \"address_line2\" | [default to 'null'] | 8 | | **company** | **String** | The column header from the csv file that should be mapped to the optional field \"company\" | [default to 'null'] | 9 | | **address_country** | **String** | The column header from the csv file that should be mapped to the optional field \"address_country\" | [default to 'null'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::OptionalAddressColumnMapping.new( 17 | address_line2: null, 18 | company: null, 19 | address_country: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/BillingGroup.md: -------------------------------------------------------------------------------- 1 | # Lob::BillingGroup 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | Description of the billing group. | [optional] | 8 | | **name** | **String** | Name of the billing group. | | 9 | | **id** | **String** | Unique identifier prefixed with `bg_`. | | 10 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | | 11 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | | 12 | | **object** | **String** | Value is resource type. | [default to 'billing_group'] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::BillingGroup.new( 20 | description: null, 21 | name: null, 22 | id: null, 23 | date_created: null, 24 | date_modified: null, 25 | object: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /__tests__/Integration/ZipLookup.spec.rb: -------------------------------------------------------------------------------- 1 | # UsAutocompletion.spec.rb 2 | require_relative '../TestFixtures' 3 | include Lob 4 | $:.unshift File.expand_path("../../lib/lob", File.dirname(__FILE__)) 5 | 6 | RSpec.describe "ZipLookupsApi" do 7 | it "can be instantiated" do 8 | zipLookupsApi = ZipLookupsApi.new() 9 | 10 | expect(zipLookupsApi).not_to be_nil 11 | expect(zipLookupsApi).to be_a_kind_of(ZipLookupsApi) 12 | end 13 | 14 | describe "Lookup" do 15 | before(:all) do 16 | api = TestFixtures.api_client_with_test_key() 17 | @zipLookupsApi = ZipLookupsApi.new(api) 18 | 19 | @zipEditable = ZipEditable.new({ 20 | zip_code: "94107" 21 | }); 22 | end 23 | 24 | it "looks up given input" do 25 | response = @zipLookupsApi.lookup(@zipEditable) 26 | expect(response.cities.length()).to be > 0 27 | end 28 | end 29 | end -------------------------------------------------------------------------------- /docs/CardList.md: -------------------------------------------------------------------------------- 1 | # Lob::CardList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<Card>**](Card.md) | list of cards | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::CardList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/CheckList.md: -------------------------------------------------------------------------------- 1 | # Lob::CheckList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<Check>**](Check.md) | list of checks | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::CheckList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/LetterList.md: -------------------------------------------------------------------------------- 1 | # Lob::LetterList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<Letter>**](Letter.md) | list of letters | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::LetterList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/AddressList.md: -------------------------------------------------------------------------------- 1 | # Lob::AddressList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<Address>**](Address.md) | list of addresses | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::AddressList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/BuckslipsList.md: -------------------------------------------------------------------------------- 1 | # Lob::BuckslipsList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<Buckslip>**](Buckslip.md) | list of buckslips | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::BuckslipsList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/CampaignsList.md: -------------------------------------------------------------------------------- 1 | # Lob::CampaignsList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<Campaign>**](Campaign.md) | list of campaigns | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::CampaignsList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/PostcardList.md: -------------------------------------------------------------------------------- 1 | # Lob::PostcardList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<Postcard>**](Postcard.md) | list of postcards | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::PostcardList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/SnapPackList.md: -------------------------------------------------------------------------------- 1 | # Lob::SnapPackList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<SnapPack>**](SnapPack.md) | list of snap packs | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::SnapPackList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/TemplateList.md: -------------------------------------------------------------------------------- 1 | # Lob::TemplateList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<Template>**](Template.md) | list of templates | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::TemplateList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/SelfMailerList.md: -------------------------------------------------------------------------------- 1 | # Lob::SelfMailerList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<SelfMailer>**](SelfMailer.md) | list of self-mailers | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::SelfMailerList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/BankAccountList.md: -------------------------------------------------------------------------------- 1 | # Lob::BankAccountList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<BankAccount>**](BankAccount.md) | list of addresses | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::BankAccountList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/TemplateVersionList.md: -------------------------------------------------------------------------------- 1 | # Lob::TemplateVersionList 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **data** | [**Array<TemplateVersion>**](TemplateVersion.md) | list of template versions | [optional] | 8 | | **object** | **String** | Value is type of resource. | [optional] | 9 | | **next_url** | **String** | url of next page of items in list. | [optional] | 10 | | **previous_url** | **String** | url of previous page of items in list. | [optional] | 11 | | **count** | **Integer** | number of resources in a set | [optional] | 12 | | **total_count** | **Integer** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::TemplateVersionList.new( 20 | data: null, 21 | object: null, 22 | next_url: null, 23 | previous_url: null, 24 | count: null, 25 | total_count: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/Thumbnail.md: -------------------------------------------------------------------------------- 1 | # Lob::Thumbnail 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **small** | **String** | A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated. | [optional] | 8 | | **medium** | **String** | A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated. | [optional] | 9 | | **large** | **String** | A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated. | [optional] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::Thumbnail.new( 17 | small: null, 18 | medium: null, 19 | large: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /docs/IntlAutocompletionsWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::IntlAutocompletionsWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **address_prefix** | **String** | Only accepts numbers and street names in an alphanumeric format. | | 8 | | **city** | **String** | An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations. | [optional] | 9 | | **state** | **String** | An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations. | [optional] | 10 | | **zip_code** | **String** | An optional Zip Code input used to filter suggestions. Matches partial entries. | [optional] | 11 | | **country** | [**CountryExtended**](CountryExtended.md) | | | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::IntlAutocompletionsWritable.new( 19 | address_prefix: null, 20 | city: null, 21 | state: null, 22 | zip_code: null, 23 | country: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/PlaceholderModel.md: -------------------------------------------------------------------------------- 1 | # Lob::PlaceholderModel 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **return_envelope** | [**ReturnEnvelope**](ReturnEnvelope.md) | | [optional] | 8 | | **address_domestic** | [**AddressDomestic**](AddressDomestic.md) | | [optional] | 9 | | **letter_details_writable** | [**LetterDetailsWritable**](LetterDetailsWritable.md) | | [optional] | 10 | | **postcard_details_writable** | [**PostcardDetailsWritable**](PostcardDetailsWritable.md) | | [optional] | 11 | | **letter_details_returned** | [**LetterDetailsReturned**](LetterDetailsReturned.md) | | [optional] | 12 | | **postcard_details_returned** | [**PostcardDetailsReturned**](PostcardDetailsReturned.md) | | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::PlaceholderModel.new( 20 | return_envelope: null, 21 | address_domestic: null, 22 | letter_details_writable: null, 23 | postcard_details_writable: null, 24 | letter_details_returned: null, 25 | postcard_details_returned: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /__tests__/Integration/ReverseGeocodeLookup.spec.rb: -------------------------------------------------------------------------------- 1 | # UsAutocompletion.spec.rb 2 | require_relative '../TestFixtures' 3 | include Lob 4 | $:.unshift File.expand_path("../../lib/lob", File.dirname(__FILE__)) 5 | 6 | RSpec.describe "ReverseGeocodeLookupsApi" do 7 | it "can be instantiated" do 8 | reverseGeocodeLookupsApi = ReverseGeocodeLookupsApi.new() 9 | 10 | expect(reverseGeocodeLookupsApi).not_to be_nil 11 | expect(reverseGeocodeLookupsApi).to be_a_kind_of(ReverseGeocodeLookupsApi) 12 | end 13 | 14 | describe "Lookup" do 15 | before(:all) do 16 | api = TestFixtures.api_client_with_test_key() 17 | @reverseGeocodeLookupsApi = ReverseGeocodeLookupsApi.new(api) 18 | 19 | @testCoordinates = Location.new({ 20 | latitude: 37.777456, 21 | longitude: -122.393039, 22 | }); 23 | end 24 | 25 | it "looks up given input" do 26 | response = @reverseGeocodeLookupsApi.lookup(@testCoordinates) 27 | expect(response.addresses.length()).to be > 0 28 | end 29 | end 30 | end -------------------------------------------------------------------------------- /docs/UsAutocompletionsWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::UsAutocompletionsWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **address_prefix** | **String** | Only accepts numbers and street names in an alphanumeric format. | | 8 | | **city** | **String** | An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations. | [optional] | 9 | | **state** | **String** | An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations. | [optional] | 10 | | **zip_code** | **String** | An optional ZIP Code input used to filter suggestions. Matches partial entries. | [optional] | 11 | | **geo_ip_sort** | **Boolean** | If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header. | [optional] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::UsAutocompletionsWritable.new( 19 | address_prefix: null, 20 | city: null, 21 | state: null, 22 | zip_code: null, 23 | geo_ip_sort: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Lob 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/run_tests.yml: -------------------------------------------------------------------------------- 1 | name: Run Tests 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | 7 | jobs: 8 | ruby_tests: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | ruby-version: ["3.0", "3.1"] 13 | steps: 14 | - uses: actions/checkout@v4 15 | 16 | - name: Set up Ruby ${{ matrix.ruby-version }} 17 | uses: ruby/setup-ruby@v1 18 | with: 19 | ruby-version: ${{ matrix.ruby-version }} 20 | - name: Install dependencies 21 | run: | 22 | sudo apt-get install libyaml-dev 23 | bundle install 24 | - name: Run Integration Tests 25 | run: 26 | rspec -P __tests__/Integration/*.spec.rb --color --format doc 27 | env: 28 | LOB_API_TEST_KEY: ${{ secrets.LOB_API_TEST_KEY }} 29 | LOB_API_LIVE_KEY: ${{ secrets.LOB_API_LIVE_KEY }} 30 | - name: Run Unit Tests 31 | run: 32 | rspec -P __tests__/Api/*.rb --color --format doc 33 | env: 34 | LOB_API_TEST_KEY: ${{ secrets.LOB_API_TEST_KEY }} 35 | LOB_API_LIVE_KEY: ${{ secrets.LOB_API_LIVE_KEY }} 36 | -------------------------------------------------------------------------------- /docs/CreativePatch.md: -------------------------------------------------------------------------------- 1 | # Lob::CreativePatch 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **from** | [**AnyType**](.md) | Must either be an address ID or an inline object with correct address parameters. | [optional] | 8 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 9 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::CreativePatch.new( 17 | from: null, 18 | description: null, 19 | metadata: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /docs/MultipleComponentsIntl.md: -------------------------------------------------------------------------------- 1 | # Lob::MultipleComponentsIntl 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **recipient** | **String** | The intended recipient, typically a person's or firm's name. | [optional] | 8 | | **primary_line** | **String** | The primary delivery line (usually the street address) of the address. | | 9 | | **secondary_line** | **String** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional] | 10 | | **city** | **String** | | [optional] | 11 | | **state** | **String** | The name of the state. | [optional] | 12 | | **postal_code** | **String** | The postal code. | [optional] | 13 | | **country** | [**CountryExtended**](CountryExtended.md) | | | 14 | 15 | ## Example 16 | 17 | ```ruby 18 | require 'lob' 19 | 20 | instance = Lob::MultipleComponentsIntl.new( 21 | recipient: null, 22 | primary_line: null, 23 | secondary_line: null, 24 | city: null, 25 | state: null, 26 | postal_code: null, 27 | country: null 28 | ) 29 | ``` 30 | 31 | -------------------------------------------------------------------------------- /docs/ZipLookupCity.md: -------------------------------------------------------------------------------- 1 | # Lob::ZipLookupCity 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **city** | **String** | | | 8 | | **state** | **String** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) two letter code for the state. | | 9 | | **county** | **String** | County name of the address city. | | 10 | | **county_fips** | **String** | A 5-digit [FIPS county code](https://en.wikipedia.org/wiki/FIPS_county_code) which uniquely identifies `components[county]`. It consists of a 2-digit state code and a 3-digit county code. | | 11 | | **preferred** | **Boolean** | Indicates whether or not the city is the [USPS default city](https://en.wikipedia.org/wiki/ZIP_Code#ZIP_Codes_and_previous_zoning_lines) (preferred city) of a ZIP code. There is only one preferred city per ZIP code, which will always be in position 0 in the array of cities. | | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::ZipLookupCity.new( 19 | city: null, 20 | state: null, 21 | county: null, 22 | county_fips: null, 23 | preferred: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/QrCode.md: -------------------------------------------------------------------------------- 1 | # Lob::QrCode 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **position** | **String** | Sets how a QR code is being positioned in the document. | | 8 | | **top** | **String** | Vertical distance(in inches) to place QR code from the top. | [optional] | 9 | | **right** | **String** | Horizonal distance(in inches) to place QR code from the right. | [optional] | 10 | | **left** | **String** | Horizonal distance(in inches) to place QR code from the left. | [optional] | 11 | | **bottom** | **String** | Vertical distance(in inches) to place QR code from the bottom. | [optional] | 12 | | **redirect_url** | **String** | The url to redirect the user when a QR code is scanned. The url must start with `https://` | | 13 | | **width** | **String** | The size(in inches) of the QR code. All QR codes are generated as a square. | | 14 | 15 | ## Example 16 | 17 | ```ruby 18 | require 'lob' 19 | 20 | instance = Lob::QrCode.new( 21 | position: null, 22 | top: null, 23 | right: null, 24 | left: null, 25 | bottom: null, 26 | redirect_url: null, 27 | width: null 28 | ) 29 | ``` 30 | 31 | -------------------------------------------------------------------------------- /docs/Suggestions.md: -------------------------------------------------------------------------------- 1 | # Lob::Suggestions 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **primary_line** | **String** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components` (primary number & secondary information may be missing or inaccurate): * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` | | 8 | | **city** | **String** | | | 9 | | **state** | **String** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) two letter code for the state. | | 10 | | **zip_code** | **String** | A 5-digit zip code. Left empty if a test key is used. | | 11 | | **object** | **String** | Value is resource type. | [optional][default to 'us_autocompletion'] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::Suggestions.new( 19 | primary_line: null, 20 | city: null, 21 | state: null, 22 | zip_code: null, 23 | object: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /lib/lob/models/snap_pack_size.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class SnapPackSize 18 | N8_5X11 = "8.5x11".freeze 19 | 20 | # Builds the enum from string 21 | # @param [String] The enum value in the form of the string 22 | # @return [String] The enum value 23 | def self.build_from_hash(value) 24 | new.build_from_hash(value) 25 | end 26 | 27 | # Builds the enum from string 28 | # @param [String] The enum value in the form of the string 29 | # @return [String] The enum value 30 | def build_from_hash(value) 31 | constantValues = SnapPackSize.constants.select { |c| SnapPackSize::const_get(c) == value } 32 | raise "Invalid ENUM value #{value} for class #SnapPackSize" if constantValues.empty? 33 | value 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /docs/Export.md: -------------------------------------------------------------------------------- 1 | # Lob::Export 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `ex_`. | | 8 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the export was created | | 9 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the export was last modified | | 10 | | **deleted** | **Boolean** | Returns as `true` if the resource has been successfully deleted. | | 11 | | **s3_url** | **String** | The URL for the generated export file. | [optional] | 12 | | **state** | **String** | The state of the export file, which can be `in_progress`, `failed` or `succeeded`. | | 13 | | **type** | **String** | The export file type, which can be `all`, `failures` or `successes`. | | 14 | | **upload_id** | **String** | Unique identifier prefixed with `upl_`. | | 15 | 16 | ## Example 17 | 18 | ```ruby 19 | require 'lob' 20 | 21 | instance = Lob::Export.new( 22 | id: null, 23 | date_created: null, 24 | date_modified: null, 25 | deleted: null, 26 | s3_url: null, 27 | state: null, 28 | type: null, 29 | upload_id: null 30 | ) 31 | ``` 32 | 33 | -------------------------------------------------------------------------------- /docs/RequiredAddressColumnMapping.md: -------------------------------------------------------------------------------- 1 | # Lob::RequiredAddressColumnMapping 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **name** | **String** | The column header from the csv file that should be mapped to the required field `name` | [default to 'null'] | 8 | | **address_line1** | **String** | The column header from the csv file that should be mapped to the required field `address_line1` | [default to 'null'] | 9 | | **address_city** | **String** | The column header from the csv file that should be mapped to the required field `address_city` | [default to 'null'] | 10 | | **address_state** | **String** | The column header from the csv file that should be mapped to the required field `address_state` | [default to 'null'] | 11 | | **address_zip** | **String** | The column header from the csv file that should be mapped to the required field `address_zip` | [default to 'null'] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::RequiredAddressColumnMapping.new( 19 | name: null, 20 | address_line1: null, 21 | address_city: null, 22 | address_state: null, 23 | address_zip: null 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /lib/lob/models/cmp_schedule_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class CmpScheduleType 18 | IMMEDIATE = "immediate".freeze 19 | 20 | # Builds the enum from string 21 | # @param [String] The enum value in the form of the string 22 | # @return [String] The enum value 23 | def self.build_from_hash(value) 24 | new.build_from_hash(value) 25 | end 26 | 27 | # Builds the enum from string 28 | # @param [String] The enum value in the form of the string 29 | # @return [String] The enum value 30 | def build_from_hash(value) 31 | constantValues = CmpScheduleType.constants.select { |c| CmpScheduleType::const_get(c) == value } 32 | raise "Invalid ENUM value #{value} for class #CmpScheduleType" if constantValues.empty? 33 | value 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /lib/lob/models/engine_html.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class EngineHtml 18 | LEGACY = "legacy".freeze 19 | HANDLEBARS = "handlebars".freeze 20 | 21 | # Builds the enum from string 22 | # @param [String] The enum value in the form of the string 23 | # @return [String] The enum value 24 | def self.build_from_hash(value) 25 | new.build_from_hash(value) 26 | end 27 | 28 | # Builds the enum from string 29 | # @param [String] The enum value in the form of the string 30 | # @return [String] The enum value 31 | def build_from_hash(value) 32 | constantValues = EngineHtml.constants.select { |c| EngineHtml::const_get(c) == value } 33 | raise "Invalid ENUM value #{value} for class #EngineHtml" if constantValues.empty? 34 | value 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /docs/LobConfidenceScore.md: -------------------------------------------------------------------------------- 1 | # Lob::LobConfidenceScore 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **score** | **Float** | A numerical score between 0 and 100 that represents the percentage of mailpieces Lob has sent to this addresses that have been delivered successfully over the past 2 years. Will be `null` if no tracking data exists for this address. | [optional] | 8 | | **level** | **String** | indicates the likelihood that the address is a valid, mail-receiving address. Possible values are: - `high` — Over 70% of mailpieces Lob has sent to this address were delivered successfully and recent mailings were also successful. - `medium` — Between 40% and 70% of mailpieces Lob has sent to this address were delivered successfully. - `low` — Less than 40% of mailpieces Lob has sent to this address were delivered successfully and recent mailings weren't successful. - `\"\"` — No tracking data exists for this address or lob deliverability was unable to find a corresponding level of mail success. | [optional] | 9 | 10 | ## Example 11 | 12 | ```ruby 13 | require 'lob' 14 | 15 | instance = Lob::LobConfidenceScore.new( 16 | score: null, 17 | level: null 18 | ) 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /__tests__/TestFixtures.rb: -------------------------------------------------------------------------------- 1 | module Lob 2 | class TestFixtures 3 | 4 | def self.api_client_with_test_key() 5 | config = Lob::Configuration.default 6 | config.username = ENV["LOB_API_TEST_KEY"] 7 | apiClient = Lob::ApiClient.new(config) 8 | return apiClient 9 | end 10 | 11 | def self.api_client_with_live_key() 12 | config = Lob::Configuration.default 13 | config.username = ENV["LOB_API_LIVE_KEY"] 14 | apiClient = Lob::ApiClient.new(config) 15 | return apiClient 16 | end 17 | 18 | def self.FILE_LOCATION() 19 | return "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/card_horizontal.pdf" 20 | end 21 | 22 | def self.FILE_LOCATION_4x6() 23 | return "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/4x6_pc_template.pdf"; 24 | end 25 | 26 | def self.FILE_LOCATION_6X18() 27 | return "https://s3.us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_inside.pdf" 28 | end 29 | 30 | def self.FILE_LOCATION_8X11() 31 | return "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/us_letter_1pg.pdf" 32 | end 33 | 34 | 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /docs/IntlVerificationWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::IntlVerificationWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **recipient** | **String** | The intended recipient, typically a person's or firm's name. | [optional] | 8 | | **primary_line** | **String** | The primary delivery line (usually the street address) of the address. | [optional] | 9 | | **secondary_line** | **String** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional] | 10 | | **city** | **String** | | [optional] | 11 | | **state** | **String** | The name of the state. | [optional] | 12 | | **postal_code** | **String** | The postal code. | [optional] | 13 | | **country** | [**CountryExtended**](CountryExtended.md) | | [optional] | 14 | | **address** | **String** | The entire address in one string (e.g., \"370 Water St C1N 1C4\"). | [optional] | 15 | 16 | ## Example 17 | 18 | ```ruby 19 | require 'lob' 20 | 21 | instance = Lob::IntlVerificationWritable.new( 22 | recipient: null, 23 | primary_line: null, 24 | secondary_line: null, 25 | city: null, 26 | state: null, 27 | postal_code: null, 28 | country: null, 29 | address: null 30 | ) 31 | ``` 32 | 33 | -------------------------------------------------------------------------------- /lib/lob/models/mail_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class MailType 18 | FIRST_CLASS = "usps_first_class".freeze 19 | STANDARD = "usps_standard".freeze 20 | 21 | # Builds the enum from string 22 | # @param [String] The enum value in the form of the string 23 | # @return [String] The enum value 24 | def self.build_from_hash(value) 25 | new.build_from_hash(value) 26 | end 27 | 28 | # Builds the enum from string 29 | # @param [String] The enum value in the form of the string 30 | # @return [String] The enum value 31 | def build_from_hash(value) 32 | constantValues = MailType.constants.select { |c| MailType::const_get(c) == value } 33 | raise "Invalid ENUM value #{value} for class #MailType" if constantValues.empty? 34 | value 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/lob/models/bank_type_enum.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class BankTypeEnum 18 | COMPANY = "company".freeze 19 | INDIVIDUAL = "individual".freeze 20 | 21 | # Builds the enum from string 22 | # @param [String] The enum value in the form of the string 23 | # @return [String] The enum value 24 | def self.build_from_hash(value) 25 | new.build_from_hash(value) 26 | end 27 | 28 | # Builds the enum from string 29 | # @param [String] The enum value in the form of the string 30 | # @return [String] The enum value 31 | def build_from_hash(value) 32 | constantValues = BankTypeEnum.constants.select { |c| BankTypeEnum::const_get(c) == value } 33 | raise "Invalid ENUM value #{value} for class #BankTypeEnum" if constantValues.empty? 34 | value 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/lob/models/postcard_size.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class PostcardSize 18 | N4X6 = "4x6".freeze 19 | N6X9 = "6x9".freeze 20 | N6X11 = "6x11".freeze 21 | 22 | # Builds the enum from string 23 | # @param [String] The enum value in the form of the string 24 | # @return [String] The enum value 25 | def self.build_from_hash(value) 26 | new.build_from_hash(value) 27 | end 28 | 29 | # Builds the enum from string 30 | # @param [String] The enum value in the form of the string 31 | # @return [String] The enum value 32 | def build_from_hash(value) 33 | constantValues = PostcardSize.constants.select { |c| PostcardSize::const_get(c) == value } 34 | raise "Invalid ENUM value #{value} for class #PostcardSize" if constantValues.empty? 35 | value 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/lob/models/chk_use_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class ChkUseType 18 | MARKETING = "marketing".freeze 19 | OPERATIONAL = "operational".freeze 20 | NULL = "null".freeze 21 | 22 | # Builds the enum from string 23 | # @param [String] The enum value in the form of the string 24 | # @return [String] The enum value 25 | def self.build_from_hash(value) 26 | new.build_from_hash(value) 27 | end 28 | 29 | # Builds the enum from string 30 | # @param [String] The enum value in the form of the string 31 | # @return [String] The enum value 32 | def build_from_hash(value) 33 | constantValues = ChkUseType.constants.select { |c| ChkUseType::const_get(c) == value } 34 | raise "Invalid ENUM value #{value} for class #ChkUseType" if constantValues.empty? 35 | value 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/lob/models/cmp_use_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class CmpUseType 18 | MARKETING = "marketing".freeze 19 | OPERATIONAL = "operational".freeze 20 | NULL = "null".freeze 21 | 22 | # Builds the enum from string 23 | # @param [String] The enum value in the form of the string 24 | # @return [String] The enum value 25 | def self.build_from_hash(value) 26 | new.build_from_hash(value) 27 | end 28 | 29 | # Builds the enum from string 30 | # @param [String] The enum value in the form of the string 31 | # @return [String] The enum value 32 | def build_from_hash(value) 33 | constantValues = CmpUseType.constants.select { |c| CmpUseType::const_get(c) == value } 34 | raise "Invalid ENUM value #{value} for class #CmpUseType" if constantValues.empty? 35 | value 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/lob/models/ltr_use_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class LtrUseType 18 | MARKETING = "marketing".freeze 19 | OPERATIONAL = "operational".freeze 20 | NULL = "null".freeze 21 | 22 | # Builds the enum from string 23 | # @param [String] The enum value in the form of the string 24 | # @return [String] The enum value 25 | def self.build_from_hash(value) 26 | new.build_from_hash(value) 27 | end 28 | 29 | # Builds the enum from string 30 | # @param [String] The enum value in the form of the string 31 | # @return [String] The enum value 32 | def build_from_hash(value) 33 | constantValues = LtrUseType.constants.select { |c| LtrUseType::const_get(c) == value } 34 | raise "Invalid ENUM value #{value} for class #LtrUseType" if constantValues.empty? 35 | value 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/lob/models/psc_use_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class PscUseType 18 | MARKETING = "marketing".freeze 19 | OPERATIONAL = "operational".freeze 20 | NULL = "null".freeze 21 | 22 | # Builds the enum from string 23 | # @param [String] The enum value in the form of the string 24 | # @return [String] The enum value 25 | def self.build_from_hash(value) 26 | new.build_from_hash(value) 27 | end 28 | 29 | # Builds the enum from string 30 | # @param [String] The enum value in the form of the string 31 | # @return [String] The enum value 32 | def build_from_hash(value) 33 | constantValues = PscUseType.constants.select { |c| PscUseType::const_get(c) == value } 34 | raise "Invalid ENUM value #{value} for class #PscUseType" if constantValues.empty? 35 | value 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/lob/models/sfm_use_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class SfmUseType 18 | MARKETING = "marketing".freeze 19 | OPERATIONAL = "operational".freeze 20 | NULL = "null".freeze 21 | 22 | # Builds the enum from string 23 | # @param [String] The enum value in the form of the string 24 | # @return [String] The enum value 25 | def self.build_from_hash(value) 26 | new.build_from_hash(value) 27 | end 28 | 29 | # Builds the enum from string 30 | # @param [String] The enum value in the form of the string 31 | # @return [String] The enum value 32 | def build_from_hash(value) 33 | constantValues = SfmUseType.constants.select { |c| SfmUseType::const_get(c) == value } 34 | raise "Invalid ENUM value #{value} for class #SfmUseType" if constantValues.empty? 35 | value 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/lob/models/snp_use_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class SnpUseType 18 | MARKETING = "marketing".freeze 19 | OPERATIONAL = "operational".freeze 20 | NULL = "null".freeze 21 | 22 | # Builds the enum from string 23 | # @param [String] The enum value in the form of the string 24 | # @return [String] The enum value 25 | def self.build_from_hash(value) 26 | new.build_from_hash(value) 27 | end 28 | 29 | # Builds the enum from string 30 | # @param [String] The enum value in the form of the string 31 | # @return [String] The enum value 32 | def build_from_hash(value) 33 | constantValues = SnpUseType.constants.select { |c| SnpUseType::const_get(c) == value } 34 | raise "Invalid ENUM value #{value} for class #SnpUseType" if constantValues.empty? 35 | value 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/lob/models/zip_code_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class ZipCodeType 18 | STANDARD = "standard".freeze 19 | PO_BOX = "po_box".freeze 20 | UNIQUE = "unique".freeze 21 | MILITARY = "military".freeze 22 | EMPTY = "".freeze 23 | 24 | # Builds the enum from string 25 | # @param [String] The enum value in the form of the string 26 | # @return [String] The enum value 27 | def self.build_from_hash(value) 28 | new.build_from_hash(value) 29 | end 30 | 31 | # Builds the enum from string 32 | # @param [String] The enum value in the form of the string 33 | # @return [String] The enum value 34 | def build_from_hash(value) 35 | constantValues = ZipCodeType.constants.select { |c| ZipCodeType::const_get(c) == value } 36 | raise "Invalid ENUM value #{value} for class #ZipCodeType" if constantValues.empty? 37 | value 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /spec/configuration_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | 15 | describe Lob::Configuration do 16 | let(:config) { Lob::Configuration.default } 17 | 18 | before(:each) do 19 | # uncomment below to setup host and base_path 20 | # require 'URI' 21 | # uri = URI.parse("https://api.lob.com/v1") 22 | # Lob.configure do |c| 23 | # c.host = uri.host 24 | # c.base_path = uri.path 25 | # end 26 | end 27 | 28 | describe '#base_url' do 29 | it 'should have the default value' do 30 | # uncomment below to test default value of the base path 31 | # expect(config.base_url).to eq("https://api.lob.com/v1") 32 | end 33 | 34 | it 'should remove trailing slashes' do 35 | [nil, '', '/', '//'].each do |base_path| 36 | config.base_path = base_path 37 | # uncomment below to test trailing slashes 38 | # expect(config.base_url).to eq("https://api.lob.com/v1") 39 | end 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /lib/lob/models/self_mailer_size.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class SelfMailerSize 18 | N6X18_BIFOLD = "6x18_bifold".freeze 19 | N11X9_BIFOLD = "11x9_bifold".freeze 20 | N12X9_BIFOLD = "12x9_bifold".freeze 21 | N17_75X9_TRIFOLD = "17.75x9_trifold".freeze 22 | 23 | # Builds the enum from string 24 | # @param [String] The enum value in the form of the string 25 | # @return [String] The enum value 26 | def self.build_from_hash(value) 27 | new.build_from_hash(value) 28 | end 29 | 30 | # Builds the enum from string 31 | # @param [String] The enum value in the form of the string 32 | # @return [String] The enum value 33 | def build_from_hash(value) 34 | constantValues = SelfMailerSize.constants.select { |c| SelfMailerSize::const_get(c) == value } 35 | raise "Invalid ENUM value #{value} for class #SelfMailerSize" if constantValues.empty? 36 | value 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /__tests__/Api/ZipLookup.unit.rb: -------------------------------------------------------------------------------- 1 | # ZipLookup.unit.rb 2 | 3 | include Lob 4 | $:.unshift File.expand_path("../../lib/lob", File.dirname(__FILE__)) 5 | 6 | RSpec.describe "ZipLookupsApi" do 7 | 8 | it "can be instantiated" do 9 | zipLookupApiMock = double("ApiClient") 10 | zipLookupApi = ZipLookupsApi.new(zipLookupApiMock) 11 | 12 | expect(zipLookupApi).not_to be_nil 13 | expect(zipLookupApi).to be_a_kind_of(ZipLookupsApi) 14 | end 15 | 16 | describe "Lookup" do 17 | it "handles errors returned by the api" do 18 | zipLookupApiMock = double("ApiClient") 19 | zipLookupApi = ZipLookupsApi.new(zipLookupApiMock) 20 | zip = Zip.new 21 | 22 | allow(zipLookupApi).to receive(:lookup).and_raise("exception thrown in lookup test") 23 | begin 24 | response = zipLookupApi.lookup(zip) 25 | rescue => err 26 | expect(err.message).to eq("exception thrown in lookup test") 27 | end 28 | end 29 | 30 | it "lookup a zip code" do 31 | zipLookupApiMock = double("ApiClient") 32 | zipLookupApi = ZipLookupsApi.new(zipLookupApiMock) 33 | zip = Zip.new 34 | zip.id = "us_zip_fakeId" 35 | 36 | allow(zipLookupApi).to receive(:lookup) { zip } 37 | response = zipLookupApi.lookup("12345") 38 | 39 | expect(response.id).to eq("us_zip_fakeId") 40 | end 41 | end 42 | end -------------------------------------------------------------------------------- /docs/IntlSuggestions.md: -------------------------------------------------------------------------------- 1 | # Lob::IntlSuggestions 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **primary_number_range** | **String** | The primary number range of the address that identifies a building at street level. | | 8 | | **primary_line** | **String** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components` (primary number & secondary information may be missing or inaccurate): * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` | | 9 | | **city** | **String** | | | 10 | | **state** | **String** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) two letter code for the state. | | 11 | | **country** | [**CountryExtended**](CountryExtended.md) | | | 12 | | **zip_code** | **String** | A 5-digit zip code. Left empty if a test key is used. | | 13 | | **object** | **String** | Value is resource type. | [optional][default to 'intl_autocompletion'] | 14 | 15 | ## Example 16 | 17 | ```ruby 18 | require 'lob' 19 | 20 | instance = Lob::IntlSuggestions.new( 21 | primary_number_range: null, 22 | primary_line: null, 23 | city: null, 24 | state: null, 25 | country: null, 26 | zip_code: null, 27 | object: null 28 | ) 29 | ``` 30 | 31 | -------------------------------------------------------------------------------- /spec/api/zip_lookups_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::ZipLookupsApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'ZipLookupsApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::ZipLookupsApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of ZipLookupsApi' do 30 | it 'should create an instance of ZipLookupsApi' do 31 | expect(@api_instance).to be_instance_of(Lob::ZipLookupsApi) 32 | end 33 | end 34 | 35 | # unit tests for zip_lookup 36 | # lookup 37 | # Returns information about a ZIP code 38 | # @param zip_editable 39 | # @param [Hash] opts the optional parameters 40 | # @return [Zip] 41 | describe 'zip_lookup test' do 42 | it 'should work' do 43 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 44 | end 45 | end 46 | 47 | end 48 | -------------------------------------------------------------------------------- /docs/IntlVerificationOrError.md: -------------------------------------------------------------------------------- 1 | # Lob::IntlVerificationOrError 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `intl_ver_`. | [optional] | 8 | | **recipient** | **String** | The intended recipient, typically a person's or firm's name. | [optional] | 9 | | **primary_line** | **String** | | [optional] | 10 | | **secondary_line** | **String** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional] | 11 | | **last_line** | **String** | | [optional] | 12 | | **country** | **String** | | [optional] | 13 | | **coverage** | **String** | | [optional] | 14 | | **deliverability** | **String** | | [optional] | 15 | | **status** | **String** | | [optional] | 16 | | **components** | [**IntlComponents**](IntlComponents.md) | | [optional] | 17 | | **object** | **String** | | [optional][default to 'intl_verification'] | 18 | | **error** | [**BulkError**](BulkError.md) | | [optional] | 19 | 20 | ## Example 21 | 22 | ```ruby 23 | require 'lob' 24 | 25 | instance = Lob::IntlVerificationOrError.new( 26 | id: null, 27 | recipient: null, 28 | primary_line: null, 29 | secondary_line: null, 30 | last_line: null, 31 | country: null, 32 | coverage: null, 33 | deliverability: null, 34 | status: null, 35 | components: null, 36 | object: null, 37 | error: null 38 | ) 39 | ``` 40 | 41 | -------------------------------------------------------------------------------- /lib/lob/models/upload_state.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class UploadState 18 | PREPROCESSING = "Preprocessing".freeze 19 | DRAFT = "Draft".freeze 20 | READY_FOR_VALIDATION = "Ready for Validation".freeze 21 | VALIDATING = "Validating".freeze 22 | SCHEDULED = "Scheduled".freeze 23 | CANCELLED = "Cancelled".freeze 24 | ERRORED = "Errored".freeze 25 | 26 | # Builds the enum from string 27 | # @param [String] The enum value in the form of the string 28 | # @return [String] The enum value 29 | def self.build_from_hash(value) 30 | new.build_from_hash(value) 31 | end 32 | 33 | # Builds the enum from string 34 | # @param [String] The enum value in the form of the string 35 | # @return [String] The enum value 36 | def build_from_hash(value) 37 | constantValues = UploadState.constants.select { |c| UploadState::const_get(c) == value } 38 | raise "Invalid ENUM value #{value} for class #UploadState" if constantValues.empty? 39 | value 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /spec/api/default_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::DefaultApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'DefaultApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::DefaultApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of DefaultApi' do 30 | it 'should create an instance of DefaultApi' do 31 | expect(@api_instance).to be_instance_of(Lob::DefaultApi) 32 | end 33 | end 34 | 35 | # unit tests for placeholder 36 | # placeholder_no_call 37 | # Don't call this. It's so that the right models can be generated. 38 | # @param [Hash] opts the optional parameters 39 | # @return [PlaceholderModel] 40 | describe 'placeholder test' do 41 | it 'should work' do 42 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 43 | end 44 | end 45 | 46 | end 47 | -------------------------------------------------------------------------------- /docs/Events.md: -------------------------------------------------------------------------------- 1 | # Lob::Events 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `evt_`. | | 8 | | **body** | **Object** | The body of the associated resource as they were at the time of the event, i.e. the [postcard object](https://docs.lob.com/#tag/Postcards/operation/postcard_retrieve), [the letter object](https://docs.lob.com/#tag/Letters/operation/letter_retrieve), [the check object](https://docs.lob.com/#tag/Checks/operation/check_retrieve), [the address object](https://docs.lob.com/#tag/Addresses/operation/address_retrieve), or [the bank account object](https://docs.lob.com/#tag/Bank-Accounts/operation/bank_account_retrieve). For `.deleted` events, the body matches the response for the corresponding delete endpoint for that resource (e.g. the [postcard cancel response](https://docs.lob.com/#tag/Postcards/operation/postcard_delete)). | | 9 | | **reference_id** | **String** | Unique identifier of the related resource for the event. | | 10 | | **event_type** | [**EventType**](EventType.md) | | | 11 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | | 12 | | **object** | **String** | Value is resource type. | [default to 'event'] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::Events.new( 20 | id: null, 21 | body: null, 22 | reference_id: null, 23 | event_type: null, 24 | date_created: null, 25 | object: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /lob.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | 3 | =begin 4 | #Lob 5 | 6 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 7 | 8 | The version of the OpenAPI document: 1.3.0 9 | Contact: lob-openapi@lob.com 10 | Generated by: https://openapi-generator.tech 11 | OpenAPI Generator version: 5.2.1 12 | 13 | =end 14 | 15 | $:.push File.expand_path("../lib", __FILE__) 16 | require "lob/version" 17 | 18 | Gem::Specification.new do |s| 19 | s.name = "lob" 20 | s.version = Lob::VERSION 21 | s.platform = Gem::Platform::RUBY 22 | s.authors = ["OpenAPI-Generator"] 23 | s.email = ["lob-openapi@lob.com"] 24 | s.homepage = "https://openapi-generator.tech" 25 | s.summary = "Lob Ruby Gem" 26 | s.description = "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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? " 27 | s.license = "Unlicense" 28 | s.required_ruby_version = ">= 2.4" 29 | 30 | s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' 31 | 32 | s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' 33 | 34 | s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } 35 | s.test_files = `find spec/*`.split("\n") 36 | s.executables = [] 37 | s.require_paths = ["lib"] 38 | end 39 | -------------------------------------------------------------------------------- /spec/api/identity_validation_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::IdentityValidationApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'IdentityValidationApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::IdentityValidationApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of IdentityValidationApi' do 30 | it 'should create an instance of IdentityValidationApi' do 31 | expect(@api_instance).to be_instance_of(Lob::IdentityValidationApi) 32 | end 33 | end 34 | 35 | # unit tests for identity_validation 36 | # validate 37 | # Validates whether a given name is associated with an address. 38 | # @param multi_line_address 39 | # @param [Hash] opts the optional parameters 40 | # @return [IdentityValidation] 41 | describe 'identity_validation test' do 42 | it 'should work' do 43 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 44 | end 45 | end 46 | 47 | end 48 | -------------------------------------------------------------------------------- /docs/BankAccountWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::BankAccountWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 8 | | **routing_number** | **String** | Must be a [valid US routing number](https://www.frbservices.org/index.html). | | 9 | | **account_number** | **String** | | | 10 | | **account_type** | [**BankTypeEnum**](BankTypeEnum.md) | | | 11 | | **signatory** | **String** | The signatory associated with your account. This name will be printed on checks created with this bank account. If you prefer to use a custom signature image on your checks instead, please create your bank account from the [Dashboard](https://dashboard.lob.com/#/login). | | 12 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 13 | 14 | ## Example 15 | 16 | ```ruby 17 | require 'lob' 18 | 19 | instance = Lob::BankAccountWritable.new( 20 | description: null, 21 | routing_number: null, 22 | account_number: null, 23 | account_type: null, 24 | signatory: null, 25 | metadata: null 26 | ) 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /docs/LetterDetailsWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::LetterDetailsWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **address_placement** | **String** | Specifies the location of the address information that will show through the double-window envelope. | [optional][default to 'top_first_page'] | 8 | | **cards** | **Array<String>** | A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. | | 9 | | **color** | **Boolean** | Set this key to `true` if you would like to print in color. Set to `false` if you would like to print in black and white. | | 10 | | **double_sided** | **Boolean** | Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`. | [optional][default to true] | 11 | | **extra_service** | **String** | Add an extra service to your letter. | [optional] | 12 | | **mail_type** | [**MailType**](MailType.md) | | [optional][default to 'usps_first_class'] | 13 | | **return_envelope** | **Boolean** | | [optional][default to false] | 14 | | **custom_envelope** | **String** | Accepts an envelope ID for any customized envelope with available inventory. | [optional] | 15 | 16 | ## Example 17 | 18 | ```ruby 19 | require 'lob' 20 | 21 | instance = Lob::LetterDetailsWritable.new( 22 | address_placement: null, 23 | cards: null, 24 | color: null, 25 | double_sided: null, 26 | extra_service: null, 27 | mail_type: null, 28 | return_envelope: null, 29 | custom_envelope: null 30 | ) 31 | ``` 32 | 33 | -------------------------------------------------------------------------------- /docs/TemplateVersionWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::TemplateVersionWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 8 | | **html** | **String** | An HTML string of less than 100,000 characters to be used as the `published_version` of this template. See [here](#section/HTML-Examples) for guidance on designing HTML templates. Please see endpoint specific documentation for any other product-specific HTML details: - [Postcards](https://docs.lob.com/#tag/Postcards/operation/postcard_create) - `front` and `back` - [Self Mailers](https://docs.lob.com/#tag/Self-Mailers/operation/self_mailer_create) - `inside` and `outside` - [Letters](https://docs.lob.com/#tag/Letters/operation/letter_create) - `file` - [Checks](https://docs.lob.com/#tag/Checks/operation/check_create) - `check_bottom` and `attachment` - [Cards](https://docs.lob.com/#tag/Cards/operation/card_create) - `front` and `back` If there is a syntax error with your variable names within your HTML, then an error will be thrown, e.g. using a `{{#users}}` opening tag without the corresponding closing tag `{{/users}}`. | | 9 | | **engine** | [**EngineHtml**](EngineHtml.md) | | [optional][default to 'legacy'] | 10 | 11 | ## Example 12 | 13 | ```ruby 14 | require 'lob' 15 | 16 | instance = Lob::TemplateVersionWritable.new( 17 | description: null, 18 | html: null, 19 | engine: null 20 | ) 21 | ``` 22 | 23 | -------------------------------------------------------------------------------- /lib/lob/models/dpv_footnote.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'date' 14 | require 'time' 15 | 16 | module Lob 17 | class DpvFootnote 18 | AA = "AA".freeze 19 | A1 = "A1".freeze 20 | BB = "BB".freeze 21 | CC = "CC".freeze 22 | C1 = "C1".freeze 23 | F1 = "F1".freeze 24 | G1 = "G1".freeze 25 | IA = "IA".freeze 26 | M1 = "M1".freeze 27 | M3 = "M3".freeze 28 | N1 = "N1".freeze 29 | PB = "PB".freeze 30 | P1 = "P1".freeze 31 | P3 = "P3".freeze 32 | R1 = "R1".freeze 33 | R7 = "R7".freeze 34 | RR = "RR".freeze 35 | TA = "TA".freeze 36 | U1 = "U1".freeze 37 | 38 | # Builds the enum from string 39 | # @param [String] The enum value in the form of the string 40 | # @return [String] The enum value 41 | def self.build_from_hash(value) 42 | new.build_from_hash(value) 43 | end 44 | 45 | # Builds the enum from string 46 | # @param [String] The enum value in the form of the string 47 | # @return [String] The enum value 48 | def build_from_hash(value) 49 | constantValues = DpvFootnote.constants.select { |c| DpvFootnote::const_get(c) == value } 50 | raise "Invalid ENUM value #{value} for class #DpvFootnote" if constantValues.empty? 51 | value 52 | end 53 | end 54 | end 55 | -------------------------------------------------------------------------------- /lib/lob/api_error.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | module Lob 14 | class ApiError < StandardError 15 | attr_reader :code, :response_headers, :response_body 16 | 17 | # Usage examples: 18 | # ApiError.new 19 | # ApiError.new("message") 20 | # ApiError.new(:code => 500, :response_headers => {}, :response_body => "") 21 | # ApiError.new(:code => 404, :message => "Not Found") 22 | def initialize(arg = nil) 23 | if arg.is_a? Hash 24 | if arg.key?(:message) || arg.key?('message') 25 | super(arg[:message] || arg['message']) 26 | else 27 | super arg 28 | end 29 | 30 | arg.each do |k, v| 31 | instance_variable_set "@#{k}", v 32 | end 33 | else 34 | super arg 35 | end 36 | end 37 | 38 | # Override to_s to display a friendly error message 39 | def to_s 40 | message 41 | end 42 | 43 | def message 44 | if @message.nil? 45 | msg = "Error message: the server returns an error" 46 | else 47 | msg = @message 48 | end 49 | 50 | msg += "\nHTTP status code: #{code}" if code 51 | msg += "\nResponse headers: #{response_headers}" if response_headers 52 | msg += "\nResponse body: #{response_body}" if response_body 53 | 54 | msg 55 | end 56 | end 57 | end 58 | -------------------------------------------------------------------------------- /docs/LetterDetailsReturned.md: -------------------------------------------------------------------------------- 1 | # Lob::LetterDetailsReturned 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **color** | **Boolean** | Set this key to `true` if you would like to print in color, false for black and white. | | 8 | | **cards** | **Array<String>** | A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. | | 9 | | **address_placement** | **String** | Specifies the location of the address information that will show through the double-window envelope. | [optional][default to 'top_first_page'] | 10 | | **custom_envelope** | [**CustomEnvelopeReturned**](CustomEnvelopeReturned.md) | | [optional] | 11 | | **double_sided** | **Boolean** | Set this attribute to `true` for double sided printing, `false` for for single sided printing. | [optional][default to true] | 12 | | **extra_service** | **String** | Add an extra service to your letter. | [optional] | 13 | | **mail_type** | [**MailType**](MailType.md) | | [optional][default to 'usps_first_class'] | 14 | | **return_envelope** | [**AnyType**](.md) | | [optional] | 15 | | **bleed** | **Boolean** | Allows for letter bleed. Enabled only with specific feature flags. | [optional][default to false] | 16 | | **file_original_url** | **String** | | [optional] | 17 | 18 | ## Example 19 | 20 | ```ruby 21 | require 'lob' 22 | 23 | instance = Lob::LetterDetailsReturned.new( 24 | color: null, 25 | cards: null, 26 | address_placement: null, 27 | custom_envelope: null, 28 | double_sided: null, 29 | extra_service: null, 30 | mail_type: null, 31 | return_envelope: null, 32 | bleed: null, 33 | file_original_url: null 34 | ) 35 | ``` 36 | 37 | -------------------------------------------------------------------------------- /docs/UploadWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::UploadWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **campaign_id** | **String** | | | 8 | | **required_address_column_mapping** | [**RequiredAddressColumnMapping**](RequiredAddressColumnMapping.md) | | [optional] | 9 | | **optional_address_column_mapping** | [**OptionalAddressColumnMapping**](OptionalAddressColumnMapping.md) | | [optional] | 10 | | **metadata** | [**UploadsMetadata**](UploadsMetadata.md) | | [optional] | 11 | | **merge_variable_column_mapping** | **Object** | The mapping of column headers in your file to the merge variables present in your creative. See our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#step-3-map-merge-variable-data-if-applicable-7\" target=\"_blank\">Campaign Audience Guide</a> for additional details. <br />If a merge variable has the same \"name\" as a \"key\" in the `requiredAddressColumnMapping` or `optionalAddressColumnMapping` objects, then they **CANNOT** have a different value in this object. If a different value is provided, then when the campaign is processing it will get overwritten with the mapped value present in the `requiredAddressColumnMapping` or `optionalAddressColumnMapping` objects. | [optional] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::UploadWritable.new( 19 | campaign_id: null, 20 | required_address_column_mapping: null, 21 | optional_address_column_mapping: null, 22 | metadata: null, 23 | merge_variable_column_mapping: {"name":"recipient_name","gift_code":"code"} 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/CardOrder.md: -------------------------------------------------------------------------------- 1 | # Lob::CardOrder 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `co_`. | [optional] | 8 | | **card_id** | **String** | Unique identifier prefixed with `card_`. | [optional] | 9 | | **status** | **String** | The status of the card order. | [optional] | 10 | | **inventory** | **Float** | The inventory of the card order. | [optional][default to 0] | 11 | | **quantity_ordered** | **Float** | The quantity of cards ordered | [optional][default to 0] | 12 | | **unit_price** | **Float** | The unit price for the card order. | [optional][default to 0] | 13 | | **cancelled_reason** | **String** | The reason for cancellation. | [optional] | 14 | | **availability_date** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] | 15 | | **expected_availability_date** | **Time** | The fixed deadline for the cards to be printed. | [optional] | 16 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | | 17 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | | 18 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 19 | | **object** | **String** | Value is type of resource. | | 20 | 21 | ## Example 22 | 23 | ```ruby 24 | require 'lob' 25 | 26 | instance = Lob::CardOrder.new( 27 | id: null, 28 | card_id: null, 29 | status: null, 30 | inventory: null, 31 | quantity_ordered: null, 32 | unit_price: null, 33 | cancelled_reason: null, 34 | availability_date: null, 35 | expected_availability_date: null, 36 | date_created: null, 37 | date_modified: null, 38 | deleted: null, 39 | object: null 40 | ) 41 | ``` 42 | 43 | -------------------------------------------------------------------------------- /__tests__/Api/ReverseGeocodeLookup.unit.rb: -------------------------------------------------------------------------------- 1 | # ReverseGeocodeLookup.unit.rb 2 | 3 | include Lob 4 | $:.unshift File.expand_path("../../lib/lob", File.dirname(__FILE__)) 5 | 6 | RSpec.describe "ReverseGeocodeLookupsApi" do 7 | 8 | it "can be instantiated" do 9 | reverseGeocodeLookupApiMock = double("ApiClient") 10 | reverseGeocodeLookupApi = ReverseGeocodeLookupsApi.new(reverseGeocodeLookupApiMock) 11 | 12 | expect(reverseGeocodeLookupApi).not_to be_nil 13 | expect(reverseGeocodeLookupApi).to be_a_kind_of(ReverseGeocodeLookupsApi) 14 | end 15 | 16 | describe "Lookup" do 17 | it "handles errors returned by the api" do 18 | reverseGeocodeLookupApiMock = double("ApiClient") 19 | reverseGeocodeLookupApi = ReverseGeocodeLookupsApi.new(reverseGeocodeLookupApiMock) 20 | location = Location.new 21 | 22 | allow(reverseGeocodeLookupApi).to receive(:lookup).and_raise("exception thrown in lookup test") 23 | begin 24 | response = reverseGeocodeLookupApi.lookup(location) 25 | rescue => err 26 | expect(err.message).to eq("exception thrown in lookup test") 27 | end 28 | end 29 | 30 | it "lookup an address" do 31 | reverseGeocodeLookupApiMock = double("ApiClient") 32 | reverseGeocodeLookupApi = ReverseGeocodeLookupsApi.new(reverseGeocodeLookupApiMock) 33 | location = Location.new 34 | reverseGeocode = ReverseGeocode.new 35 | reverseGeocode.id = "us_reverse_geocode_fakeId" 36 | 37 | allow(reverseGeocodeLookupApi).to receive(:lookup) { reverseGeocode } 38 | response = reverseGeocodeLookupApi.lookup(location, { size: 6 }) 39 | 40 | expect(response.id).to eq("us_reverse_geocode_fakeId") 41 | end 42 | end 43 | end -------------------------------------------------------------------------------- /spec/api/reverse_geocode_lookups_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::ReverseGeocodeLookupsApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'ReverseGeocodeLookupsApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::ReverseGeocodeLookupsApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of ReverseGeocodeLookupsApi' do 30 | it 'should create an instance of ReverseGeocodeLookupsApi' do 31 | expect(@api_instance).to be_instance_of(Lob::ReverseGeocodeLookupsApi) 32 | end 33 | end 34 | 35 | # unit tests for reverse_geocode_lookup 36 | # lookup 37 | # Reverse geocode a valid US location with a live API key. 38 | # @param location 39 | # @param [Hash] opts the optional parameters 40 | # @option opts [Integer] :size Determines the number of locations returned. Possible values are between 1 and 50 and any number higher will be rounded down to 50. Default size is a list of 5 reverse geocoded locations. 41 | # @return [ReverseGeocode] 42 | describe 'reverse_geocode_lookup test' do 43 | it 'should work' do 44 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 45 | end 46 | end 47 | 48 | end 49 | -------------------------------------------------------------------------------- /spec/api/us_autocompletions_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::UsAutocompletionsApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'UsAutocompletionsApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::UsAutocompletionsApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of UsAutocompletionsApi' do 30 | it 'should create an instance of UsAutocompletionsApi' do 31 | expect(@api_instance).to be_instance_of(Lob::UsAutocompletionsApi) 32 | end 33 | end 34 | 35 | # unit tests for us_autocompletion 36 | # autocomplete 37 | # Given an address prefix consisting of a partial primary line, as well as optional input of city, state, and zip code, this functionality returns up to 10 full US address suggestions. Not all of them will turn out to be valid addresses; they'll need to be [verified](#operation/verification_us). 38 | # @param us_autocompletions_writable 39 | # @param [Hash] opts the optional parameters 40 | # @return [UsAutocompletions] 41 | describe 'us_autocompletion test' do 42 | it 'should work' do 43 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 44 | end 45 | end 46 | 47 | end 48 | -------------------------------------------------------------------------------- /docs/UploadUpdatable.md: -------------------------------------------------------------------------------- 1 | # Lob::UploadUpdatable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **original_filename** | **String** | Original filename provided when the upload is created. | [optional] | 8 | | **required_address_column_mapping** | [**RequiredAddressColumnMapping**](RequiredAddressColumnMapping.md) | | [optional] | 9 | | **optional_address_column_mapping** | [**OptionalAddressColumnMapping**](OptionalAddressColumnMapping.md) | | [optional] | 10 | | **metadata** | [**UploadsMetadata**](UploadsMetadata.md) | | [optional] | 11 | | **merge_variable_column_mapping** | **Object** | The mapping of column headers in your file to the merge variables present in your creative. See our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#step-3-map-merge-variable-data-if-applicable-7\" target=\"_blank\">Campaign Audience Guide</a> for additional details. <br />If a merge variable has the same \"name\" as a \"key\" in the `requiredAddressColumnMapping` or `optionalAddressColumnMapping` objects, then they **CANNOT** have a different value in this object. If a different value is provided, then when the campaign is processing it will get overwritten with the mapped value present in the `requiredAddressColumnMapping` or `optionalAddressColumnMapping` objects. | [optional] | 12 | 13 | ## Example 14 | 15 | ```ruby 16 | require 'lob' 17 | 18 | instance = Lob::UploadUpdatable.new( 19 | original_filename: null, 20 | required_address_column_mapping: null, 21 | optional_address_column_mapping: null, 22 | metadata: null, 23 | merge_variable_column_mapping: {"name":"recipient_name","gift_code":"code"} 24 | ) 25 | ``` 26 | 27 | -------------------------------------------------------------------------------- /docs/BuckslipOrder.md: -------------------------------------------------------------------------------- 1 | # Lob::BuckslipOrder 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | | 8 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | | 9 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 10 | | **object** | **String** | Value is type of resource. | | 11 | | **id** | **String** | Unique identifier prefixed with `bo_`. | [optional] | 12 | | **buckslip_id** | **String** | Unique identifier prefixed with `bck_`. | [optional] | 13 | | **status** | **String** | The status of the buckslip order. | [optional] | 14 | | **quantity_ordered** | **Float** | The quantity of buckslips ordered. | [optional][default to 0] | 15 | | **unit_price** | **Float** | The unit price for the buckslip order. | [optional][default to 0] | 16 | | **inventory** | **Float** | The inventory of the buckslip order. | [optional][default to 0] | 17 | | **cancelled_reason** | **String** | The reason for cancellation. | [optional] | 18 | | **availability_date** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] | 19 | | **expected_availability_date** | **Time** | The fixed deadline for the buckslips to be printed. | [optional] | 20 | 21 | ## Example 22 | 23 | ```ruby 24 | require 'lob' 25 | 26 | instance = Lob::BuckslipOrder.new( 27 | date_created: null, 28 | date_modified: null, 29 | deleted: null, 30 | object: null, 31 | id: null, 32 | buckslip_id: null, 33 | status: null, 34 | quantity_ordered: null, 35 | unit_price: null, 36 | inventory: null, 37 | cancelled_reason: null, 38 | availability_date: null, 39 | expected_availability_date: null 40 | ) 41 | ``` 42 | 43 | -------------------------------------------------------------------------------- /docs/DefaultApi.md: -------------------------------------------------------------------------------- 1 | # Lob::DefaultApi 2 | 3 | All URIs are relative to *https://api.lob.com/v1* 4 | 5 | | Method | HTTP request | Description | 6 | | ------ | ------------ | ----------- | 7 | | [**placeholder**](DefaultApi.md#placeholder) | **GET** /shared_dont_call | placeholder_no_call | 8 | 9 | 10 | ## placeholder 11 | 12 | > placeholder 13 | 14 | placeholder_no_call 15 | 16 | Don't call this. It's so that the right models can be generated. 17 | 18 | ### Examples 19 | 20 | ```ruby 21 | require 'time' 22 | require 'lob' 23 | # setup authorization 24 | Lob.configure do |config| 25 | # Configure HTTP basic authorization: basicAuth 26 | config.username = 'YOUR USERNAME' 27 | config.password = 'YOUR PASSWORD' 28 | end 29 | 30 | api_instance = Lob::DefaultApi.new 31 | 32 | begin 33 | # placeholder_no_call 34 | result = api_instance.placeholder_no_call 35 | p result 36 | rescue Lob::ApiError => e 37 | puts "Error when calling DefaultApi->placeholder_no_call: #{e}" 38 | end 39 | ``` 40 | 41 | #### Using the placeholder_with_http_info variant 42 | 43 | This returns an Array which contains the response data, status code and headers. 44 | 45 | > , Integer, Hash)> placeholder_with_http_info 46 | 47 | ```ruby 48 | begin 49 | # placeholder_no_call 50 | data, status_code, headers = api_instance.placeholder_with_http_info 51 | p status_code # => 2xx 52 | p headers # => { ... } 53 | p data # => 54 | rescue Lob::ApiError => e 55 | puts "Error when calling DefaultApi->placeholder_with_http_info: #{e}" 56 | end 57 | ``` 58 | 59 | ### Parameters 60 | 61 | This endpoint does not need any parameter. 62 | 63 | ### Return type 64 | 65 | [**PlaceholderModel**](PlaceholderModel.md) 66 | 67 | ### Authorization 68 | 69 | [basicAuth](../README.md#basicAuth) 70 | 71 | ### HTTP request headers 72 | 73 | - **Content-Type**: Not defined 74 | - **Accept**: application/json 75 | 76 | -------------------------------------------------------------------------------- /__tests__/Api/UsAutocompletion.unit.rb: -------------------------------------------------------------------------------- 1 | # IntlAutcompletion.unit.rb 2 | 3 | $:.unshift File.expand_path("../../lib/lob", File.dirname(__FILE__)) 4 | 5 | RSpec.describe "UsAutocompletionsApi" do 6 | 7 | it "can be instantiated" do 8 | usAutocompletionApiMock = double("ApiClient") 9 | usAutocompletionApi = Lob::UsAutocompletionsApi.new(usAutocompletionApiMock) 10 | 11 | expect(usAutocompletionApi).not_to be_nil 12 | expect(usAutocompletionApi).to be_a_kind_of(Lob::UsAutocompletionsApi) 13 | end 14 | 15 | describe "Autocomplete" do 16 | it "handles errors returned by the api" do 17 | usAutocompletionApiMock = double("ApiClient") 18 | usAutocompletionApi = Lob::UsAutocompletionsApi.new(usAutocompletionApiMock) 19 | usAutocompletionsWritable = Lob::UsAutocompletionsWritable.new 20 | 21 | allow(usAutocompletionApi).to receive(:autocomplete).and_raise("exception thrown in autocomplete test") 22 | begin 23 | response = usAutocompletionApi.autocomplete(usAutocompletionsWritable) 24 | rescue => err 25 | expect(err.message).to eq("exception thrown in autocomplete test") 26 | end 27 | end 28 | 29 | it "autocomplete an address" do 30 | usAutocompletionApiMock = double("ApiClient") 31 | usAutocompletionApi = Lob::UsAutocompletionsApi.new(usAutocompletionApiMock) 32 | usAutocompletionsWritable = Lob::UsAutocompletionsWritable.new 33 | usAutocompletions = Lob::UsAutocompletions.new 34 | usAutocompletions.suggestions = Array.new(1, Lob::Suggestions.new) 35 | 36 | allow(usAutocompletionApi).to receive(:autocomplete) { usAutocompletions } 37 | response = usAutocompletionApi.autocomplete(usAutocompletionsWritable) 38 | 39 | expect(response.suggestions.length()).to eq(1) 40 | end 41 | end 42 | end -------------------------------------------------------------------------------- /docs/CreativeWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::CreativeWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **from** | [**AnyType**](.md) | Must either be an address ID or an inline object with correct address parameters. | | 8 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 9 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 10 | | **resource_type** | **String** | Mailpiece type for the creative | | 11 | | **campaign_id** | **String** | Unique identifier prefixed with `cmp_`. | | 12 | | **details** | [**AnyType**](.md) | Either PostcardDetailsWritable or LetterDetailsWritable | [optional] | 13 | | **file** | **String** | PDF file containing the letter's formatting. Do not include for resource_type = postcard. | [optional] | 14 | | **front** | **String** | The artwork to use as the front of your postcard. Do not include for resource_type = letter. | [optional] | 15 | | **back** | **String** | The artwork to use as the back of your postcard. Do not include for resource_type = letter. | [optional] | 16 | 17 | ## Example 18 | 19 | ```ruby 20 | require 'lob' 21 | 22 | instance = Lob::CreativeWritable.new( 23 | from: null, 24 | description: null, 25 | metadata: null, 26 | resource_type: null, 27 | campaign_id: null, 28 | details: null, 29 | file: null, 30 | front: null, 31 | back: null 32 | ) 33 | ``` 34 | 35 | -------------------------------------------------------------------------------- /docs/Template.md: -------------------------------------------------------------------------------- 1 | # Lob::Template 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 8 | | **id** | **String** | Unique identifier prefixed with `tmpl_`. ID of a saved [HTML template](#section/HTML-Templates). | | 9 | | **versions** | [**Array<TemplateVersion>**](TemplateVersion.md) | An array of all non-deleted [version objects](#tag/Template-Versions) associated with the template. | | 10 | | **published_version** | [**TemplateVersion**](TemplateVersion.md) | | | 11 | | **object** | **String** | Value is resource type. | [optional][default to 'template'] | 12 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 13 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] | 14 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] | 15 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 16 | 17 | ## Example 18 | 19 | ```ruby 20 | require 'lob' 21 | 22 | instance = Lob::Template.new( 23 | description: null, 24 | id: null, 25 | versions: null, 26 | published_version: null, 27 | object: null, 28 | metadata: null, 29 | date_created: null, 30 | date_modified: null, 31 | deleted: null 32 | ) 33 | ``` 34 | 35 | -------------------------------------------------------------------------------- /__tests__/Api/IntlAutocompletion.unit.rb: -------------------------------------------------------------------------------- 1 | # IntlAutcompletion.unit.rb 2 | 3 | include Lob 4 | $:.unshift File.expand_path("../../lib/lob", File.dirname(__FILE__)) 5 | 6 | RSpec.describe "IntlAutocompletionsApi" do 7 | 8 | it "can be instantiated" do 9 | intlAutocompletionApiMock = double("ApiClient") 10 | intlAutocompletionApi = IntlAutocompletionsApi.new(intlAutocompletionApiMock) 11 | 12 | expect(intlAutocompletionApi).not_to be_nil 13 | expect(intlAutocompletionApi).to be_a_kind_of(IntlAutocompletionsApi) 14 | end 15 | 16 | describe "Autocomplete" do 17 | it "handles errors returned by the api" do 18 | intlAutocompletionApiMock = double("ApiClient") 19 | intlAutocompletionApi = IntlAutocompletionsApi.new(intlAutocompletionApiMock) 20 | intlAutocompletionsWritable = IntlAutocompletionsWritable.new 21 | 22 | allow(intlAutocompletionApi).to receive(:autocomplete).and_raise("exception thrown in autocomplete test") 23 | begin 24 | response = intlAutocompletionApi.autocomplete(intlAutocompletionsWritable) 25 | rescue => err 26 | expect(err.message).to eq("exception thrown in autocomplete test") 27 | end 28 | end 29 | 30 | it "autocomplete an address" do 31 | intlAutocompletionApiMock = double("ApiClient") 32 | intlAutocompletionApi = IntlAutocompletionsApi.new(intlAutocompletionApiMock) 33 | intlAutocompletionsWritable = IntlAutocompletionsWritable.new 34 | intlAutocompletions = IntlAutocompletions.new 35 | intlAutocompletions.suggestions = Array.new(1, IntlSuggestions.new) 36 | 37 | allow(intlAutocompletionApi).to receive(:autocomplete) { intlAutocompletions } 38 | response = intlAutocompletionApi.autocomplete(intlAutocompletionsWritable) 39 | 40 | expect(response.suggestions.length()).to eq(1) 41 | end 42 | end 43 | end -------------------------------------------------------------------------------- /docs/ZipLookupsApi.md: -------------------------------------------------------------------------------- 1 | # Lob::ZipLookupsApi 2 | 3 | All URIs are relative to *https://api.lob.com/v1* 4 | 5 | | Method | HTTP request | Description | 6 | | ------ | ------------ | ----------- | 7 | | [**zip_lookup**](ZipLookupsApi.md#zip_lookup) | **POST** /us_zip_lookups | lookup | 8 | 9 | 10 | ## zip_lookup 11 | 12 | > zip_lookup(zip_editable) 13 | 14 | lookup 15 | 16 | Returns information about a ZIP code 17 | 18 | ### Examples 19 | 20 | ```ruby 21 | require 'time' 22 | require 'lob' 23 | # setup authorization 24 | Lob.configure do |config| 25 | # Configure HTTP basic authorization: basicAuth 26 | config.username = 'YOUR USERNAME' 27 | config.password = 'YOUR PASSWORD' 28 | end 29 | 30 | api_instance = Lob::ZipLookupsApi.new 31 | zip_editable = Lob::ZipEditable.new # ZipEditable | 32 | 33 | begin 34 | # lookup 35 | result = api_instance.lookup(zip_editable) 36 | p result 37 | rescue Lob::ApiError => e 38 | puts "Error when calling ZipLookupsApi->lookup: #{e}" 39 | end 40 | ``` 41 | 42 | #### Using the zip_lookup_with_http_info variant 43 | 44 | This returns an Array which contains the response data, status code and headers. 45 | 46 | > , Integer, Hash)> zip_lookup_with_http_info(zip_editable) 47 | 48 | ```ruby 49 | begin 50 | # lookup 51 | data, status_code, headers = api_instance.zip_lookup_with_http_info(zip_editable) 52 | p status_code # => 2xx 53 | p headers # => { ... } 54 | p data # => 55 | rescue Lob::ApiError => e 56 | puts "Error when calling ZipLookupsApi->zip_lookup_with_http_info: #{e}" 57 | end 58 | ``` 59 | 60 | ### Parameters 61 | 62 | | Name | Type | Description | Notes | 63 | | ---- | ---- | ----------- | ----- | 64 | | **zip_editable** | [**ZipEditable**](ZipEditable.md) | | | 65 | 66 | ### Return type 67 | 68 | [**Zip**](Zip.md) 69 | 70 | ### Authorization 71 | 72 | [basicAuth](../README.md#basicAuth) 73 | 74 | ### HTTP request headers 75 | 76 | - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data 77 | - **Accept**: application/json 78 | 79 | -------------------------------------------------------------------------------- /git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | git_host=$4 10 | 11 | if [ "$git_host" = "" ]; then 12 | git_host="github.com" 13 | echo "[INFO] No command line input provided. Set \$git_host to $git_host" 14 | fi 15 | 16 | if [ "$git_user_id" = "" ]; then 17 | git_user_id="GIT_USER_ID" 18 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 19 | fi 20 | 21 | if [ "$git_repo_id" = "" ]; then 22 | git_repo_id="GIT_REPO_ID" 23 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 24 | fi 25 | 26 | if [ "$release_note" = "" ]; then 27 | release_note="Minor update" 28 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 29 | fi 30 | 31 | # Initialize the local directory as a Git repository 32 | git init 33 | 34 | # Adds the files in the local repository and stages them for commit. 35 | git add . 36 | 37 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 38 | git commit -m "$release_note" 39 | 40 | # Sets the new remote 41 | git_remote=$(git remote) 42 | if [ "$git_remote" = "" ]; then # git remote not defined 43 | 44 | if [ "$GIT_TOKEN" = "" ]; then 45 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 46 | git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git 47 | else 48 | git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git 49 | fi 50 | 51 | fi 52 | 53 | git pull origin master 54 | 55 | # Pushes (Forces) the changes in the local repository up to the remote repository 56 | echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" 57 | git push origin master 2>&1 | grep -v 'To https' 58 | -------------------------------------------------------------------------------- /__tests__/Integration/UsAutocompletion.spec.rb: -------------------------------------------------------------------------------- 1 | # UsAutocompletion.spec.rb 2 | require_relative '../TestFixtures' 3 | include Lob 4 | $:.unshift File.expand_path("../../lib/lob", File.dirname(__FILE__)) 5 | 6 | RSpec.describe "UsAutocompletionsApi" do 7 | it "can be instantiated" do 8 | usAutocompletionApi = UsAutocompletionsApi.new() 9 | 10 | expect(usAutocompletionApi).not_to be_nil 11 | expect(usAutocompletionApi).to be_a_kind_of(UsAutocompletionsApi) 12 | end 13 | 14 | describe "Autocomplete" do 15 | before(:all) do 16 | api = TestFixtures.api_client_with_test_key() 17 | @usAutocompletionApi = UsAutocompletionsApi.new(api) 18 | 19 | @validAddress = UsAutocompletionsWritable.new({ 20 | address_prefix: "1 suggestion", 21 | city: "SAN FRANCISCO", 22 | }) 23 | end 24 | 25 | it "Autocompletes US address (with test key)" do 26 | autocompletedAddr = @usAutocompletionApi.autocomplete(@validAddress) 27 | expect(autocompletedAddr.suggestions[0].primary_line).to eq("1 TELEGRAPH HILL BLVD") 28 | end 29 | 30 | it "handles errors returned by the api" do 31 | validAddress = UsAutocompletionsWritable.new() 32 | begin 33 | response = @usAutocompletionApi.autocomplete(validAddress) 34 | rescue => err 35 | expect(err.message.include? "address_prefix is required").to be(true) 36 | end 37 | end 38 | 39 | it "does not allow creation with invalid key" do 40 | config = Lob::Configuration.default 41 | config.username = "fake key" 42 | badapi = Lob::ApiClient.new(config) 43 | 44 | usAutocompletionApi = UsAutocompletionsApi.new(badapi) 45 | 46 | begin 47 | response = usAutocompletionApi.autocomplete(@validAddress) 48 | rescue => err 49 | expect(err.message.include? "Your API key is not valid.").to be(true) 50 | end 51 | end 52 | end 53 | end -------------------------------------------------------------------------------- /docs/CampaignUpdatable.md: -------------------------------------------------------------------------------- 1 | # Lob::CampaignUpdatable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **name** | **String** | | [optional] | 8 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 9 | | **schedule_type** | [**CmpScheduleType**](CmpScheduleType.md) | | [optional] | 10 | | **target_delivery_date** | **Time** | If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign. | [optional] | 11 | | **send_date** | **Time** | If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign. | [optional] | 12 | | **cancel_window_campaign_minutes** | **Integer** | A window, in minutes, within which the campaign can be canceled. | [optional] | 13 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 14 | | **is_draft** | **Boolean** | Whether or not the campaign is still a draft. | [optional] | 15 | | **use_type** | [**CmpUseType**](CmpUseType.md) | | [optional] | 16 | | **auto_cancel_if_ncoa** | **Boolean** | Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA. | [optional] | 17 | 18 | ## Example 19 | 20 | ```ruby 21 | require 'lob' 22 | 23 | instance = Lob::CampaignUpdatable.new( 24 | name: null, 25 | description: null, 26 | schedule_type: null, 27 | target_delivery_date: null, 28 | send_date: null, 29 | cancel_window_campaign_minutes: null, 30 | metadata: null, 31 | is_draft: null, 32 | use_type: null, 33 | auto_cancel_if_ncoa: null 34 | ) 35 | ``` 36 | 37 | -------------------------------------------------------------------------------- /docs/CampaignWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::CampaignWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **billing_group_id** | **String** | Unique identifier prefixed with `bg_`. | [optional] | 8 | | **name** | **String** | Name of the campaign. | | 9 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 10 | | **schedule_type** | [**CmpScheduleType**](CmpScheduleType.md) | | | 11 | | **target_delivery_date** | **Time** | If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign. | [optional] | 12 | | **send_date** | **Time** | If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign. | [optional] | 13 | | **cancel_window_campaign_minutes** | **Integer** | A window, in minutes, within which the campaign can be canceled. | [optional] | 14 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 15 | | **use_type** | [**CmpUseType**](CmpUseType.md) | | | 16 | | **auto_cancel_if_ncoa** | **Boolean** | Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA. | [optional] | 17 | 18 | ## Example 19 | 20 | ```ruby 21 | require 'lob' 22 | 23 | instance = Lob::CampaignWritable.new( 24 | billing_group_id: null, 25 | name: null, 26 | description: null, 27 | schedule_type: null, 28 | target_delivery_date: null, 29 | send_date: null, 30 | cancel_window_campaign_minutes: null, 31 | metadata: null, 32 | use_type: null, 33 | auto_cancel_if_ncoa: null 34 | ) 35 | ``` 36 | 37 | -------------------------------------------------------------------------------- /spec/api/intl_autocompletions_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::IntlAutocompletionsApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'IntlAutocompletionsApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::IntlAutocompletionsApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of IntlAutocompletionsApi' do 30 | it 'should create an instance of IntlAutocompletionsApi' do 31 | expect(@api_instance).to be_instance_of(Lob::IntlAutocompletionsApi) 32 | end 33 | end 34 | 35 | # unit tests for intl_autocompletion 36 | # autocomplete 37 | # Given an address prefix consisting of a partial primary line and country, as well as optional input of city, state, and zip code, this functionality returns up to 10 full International address suggestions. Not all of them will turn out to be valid addresses; they'll need to be [verified](#operation/intl_verification). 38 | # @param intl_autocompletions_writable 39 | # @param [Hash] opts the optional parameters 40 | # @option opts [String] :x_lang_output * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. 41 | # @return [IntlAutocompletions] 42 | describe 'intl_autocompletion test' do 43 | it 'should work' do 44 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 45 | end 46 | end 47 | 48 | end 49 | -------------------------------------------------------------------------------- /docs/TemplateWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::TemplateWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 8 | | **html** | **String** | An HTML string of less than 100,000 characters to be used as the `published_version` of this template. See [here](#section/HTML-Examples) for guidance on designing HTML templates. Please see endpoint specific documentation for any other product-specific HTML details: - [Postcards](https://docs.lob.com/#tag/Postcards/operation/postcard_create) - `front` and `back` - [Self Mailers](https://docs.lob.com/#tag/Self-Mailers/operation/self_mailer_create) - `inside` and `outside` - [Letters](https://docs.lob.com/#tag/Letters/operation/letter_create) - `file` - [Checks](https://docs.lob.com/#tag/Checks/operation/check_create) - `check_bottom` and `attachment` - [Cards](https://docs.lob.com/#tag/Cards/operation/card_create) - `front` and `back` If there is a syntax error with your variable names within your HTML, then an error will be thrown, e.g. using a `{{#users}}` opening tag without the corresponding closing tag `{{/users}}`. | | 9 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 10 | | **engine** | [**EngineHtml**](EngineHtml.md) | | [optional][default to 'legacy'] | 11 | 12 | ## Example 13 | 14 | ```ruby 15 | require 'lob' 16 | 17 | instance = Lob::TemplateWritable.new( 18 | description: null, 19 | html: null, 20 | metadata: null, 21 | engine: null 22 | ) 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /__tests__/Integration/IntlAutocompletion.spec.rb: -------------------------------------------------------------------------------- 1 | # IntlAutocompletion.spec.rb 2 | require_relative '../TestFixtures' 3 | include Lob 4 | $:.unshift File.expand_path("../../lib/lob", File.dirname(__FILE__)) 5 | 6 | RSpec.describe "IntlAutocompletionsApi" do 7 | it "can be instantiated" do 8 | intlAutocompletionApi = IntlAutocompletionsApi.new() 9 | 10 | expect(intlAutocompletionApi).not_to be_nil 11 | expect(intlAutocompletionApi).to be_a_kind_of(IntlAutocompletionsApi) 12 | end 13 | 14 | describe "Autocomplete" do 15 | before(:all) do 16 | api = TestFixtures.api_client_with_test_key() 17 | @intlAutocompletionApi = IntlAutocompletionsApi.new(api) 18 | 19 | @validAddress = IntlAutocompletionsWritable.new({ 20 | address_prefix: "370 W", 21 | city: "SUMMERSIDE", 22 | country: CountryExtended::CA 23 | }) 24 | end 25 | 26 | skip "Autocompletes intl address (with test key)" do 27 | autocompletedAddr = @intlAutocompletionApi.autocomplete(@validAddress) 28 | expect(autocompletedAddr.suggestions[0].primary_line).to eq("TEST KEYS DO NOT AUTOCOMPLETE INTL ADDRESSES") 29 | end 30 | 31 | it "handles errors returned by the api" do 32 | validAddress = IntlAutocompletionsWritable.new() 33 | begin 34 | response = @intlAutocompletionApi.autocomplete(validAddress) 35 | rescue => err 36 | expect(err.message.include? "address_prefix is required").to be(true) 37 | end 38 | end 39 | 40 | it "does not allow creation with invalid key" do 41 | config = Lob::Configuration.default 42 | config.username = "fake key" 43 | badapi = Lob::ApiClient.new(config) 44 | 45 | intlAutocompletionApi = IntlAutocompletionsApi.new(badapi) 46 | 47 | begin 48 | response = intlAutocompletionApi.autocomplete(@validAddress) 49 | rescue => err 50 | expect(err.message.include? "Your API key is not valid.").to be(true) 51 | end 52 | end 53 | end 54 | end -------------------------------------------------------------------------------- /docs/AddressEditable.md: -------------------------------------------------------------------------------- 1 | # Lob::AddressEditable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **address_line1** | **String** | The building number, street name, street suffix, and any street directionals. For US addresses, the max length is 64 characters. | [optional] | 8 | | **address_line2** | **String** | The suite or apartment number of the recipient address, if applicable. For US addresses, the max length is 64 characters. | [optional] | 9 | | **address_city** | **String** | | [optional] | 10 | | **address_state** | **String** | | [optional] | 11 | | **address_zip** | **String** | Optional postal code. For US addresses, must be either 5 or 9 digits. | [optional] | 12 | | **address_country** | [**CountryExtended**](CountryExtended.md) | | [optional] | 13 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 14 | | **name** | **String** | name associated with address. | [optional] | 15 | | **company** | **String** | Either `name` or `company` is required, you may also add both. | [optional] | 16 | | **phone** | **String** | Must be no longer than 40 characters. | [optional] | 17 | | **email** | **String** | Must be no longer than 100 characters. | [optional] | 18 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 19 | 20 | ## Example 21 | 22 | ```ruby 23 | require 'lob' 24 | 25 | instance = Lob::AddressEditable.new( 26 | address_line1: null, 27 | address_line2: null, 28 | address_city: null, 29 | address_state: null, 30 | address_zip: null, 31 | address_country: null, 32 | description: null, 33 | name: null, 34 | company: null, 35 | phone: null, 36 | email: null, 37 | metadata: null 38 | ) 39 | ``` 40 | 41 | -------------------------------------------------------------------------------- /docs/MultipleComponents.md: -------------------------------------------------------------------------------- 1 | # Lob::MultipleComponents 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **recipient** | **String** | The intended recipient, typically a person's or firm's name. | [optional] | 8 | | **primary_line** | **String** | 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` | | 9 | | **secondary_line** | **String** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional] | 10 | | **urbanization** | **String** | 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. | [optional] | 11 | | **city** | **String** | | [optional] | 12 | | **state** | **String** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. | [optional] | 13 | | **zip_code** | **String** | 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`). | [optional] | 14 | | **transient_id** | **String** | ID that is returned in the response body for the verification | [optional] | 15 | 16 | ## Example 17 | 18 | ```ruby 19 | require 'lob' 20 | 21 | instance = Lob::MultipleComponents.new( 22 | recipient: null, 23 | primary_line: null, 24 | secondary_line: null, 25 | urbanization: null, 26 | city: null, 27 | state: null, 28 | zip_code: null, 29 | transient_id: null 30 | ) 31 | ``` 32 | 33 | -------------------------------------------------------------------------------- /spec/api/card_orders_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::CardOrdersApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'CardOrdersApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::CardOrdersApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of CardOrdersApi' do 30 | it 'should create an instance of CardOrdersApi' do 31 | expect(@api_instance).to be_instance_of(Lob::CardOrdersApi) 32 | end 33 | end 34 | 35 | # unit tests for card_order_create 36 | # create 37 | # Creates a new card order given information 38 | # @param card_id The ID of the card to which the card orders belong. 39 | # @param card_order_editable 40 | # @param [Hash] opts the optional parameters 41 | # @return [CardOrder] 42 | describe 'card_order_create test' do 43 | it 'should work' do 44 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 45 | end 46 | end 47 | 48 | # unit tests for card_orders_retrieve 49 | # get 50 | # Retrieves the card orders associated with the given card id. 51 | # @param card_id The ID of the card to which the card orders belong. 52 | # @param [Hash] opts the optional parameters 53 | # @option opts [Integer] :limit How many results to return. 54 | # @option opts [Integer] :offset An integer that designates the offset at which to begin returning results. Defaults to 0. 55 | # @return [CardOrderList] 56 | describe 'card_orders_retrieve test' do 57 | it 'should work' do 58 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 59 | end 60 | end 61 | 62 | end 63 | -------------------------------------------------------------------------------- /docs/MultiLineAddress.md: -------------------------------------------------------------------------------- 1 | # Lob::MultiLineAddress 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **recipient** | **String** | The intended recipient, typically a person's or firm's name. | [optional] | 8 | | **company** | **String** | Either `name` or `company` is required, you may also add both. | [optional] | 9 | | **primary_line** | **String** | 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` | | 10 | | **secondary_line** | **String** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional] | 11 | | **urbanization** | **String** | 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. | [optional] | 12 | | **city** | **String** | | [optional] | 13 | | **state** | **String** | The <a href=\"https://en.wikipedia.org/wiki/ISO_3166-2:US\" target=\"_blank\">ISO 3166-2</a> two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. | [optional] | 14 | | **zip_code** | **String** | 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`). | [optional] | 15 | 16 | ## Example 17 | 18 | ```ruby 19 | require 'lob' 20 | 21 | instance = Lob::MultiLineAddress.new( 22 | recipient: null, 23 | company: null, 24 | primary_line: null, 25 | secondary_line: null, 26 | urbanization: null, 27 | city: null, 28 | state: null, 29 | zip_code: null 30 | ) 31 | ``` 32 | 33 | -------------------------------------------------------------------------------- /docs/IdentityValidationApi.md: -------------------------------------------------------------------------------- 1 | # Lob::IdentityValidationApi 2 | 3 | All URIs are relative to *https://api.lob.com/v1* 4 | 5 | | Method | HTTP request | Description | 6 | | ------ | ------------ | ----------- | 7 | | [**identity_validation**](IdentityValidationApi.md#identity_validation) | **POST** /identity_validation | validate | 8 | 9 | 10 | ## identity_validation 11 | 12 | > identity_validation(multi_line_address) 13 | 14 | validate 15 | 16 | Validates whether a given name is associated with an address. 17 | 18 | ### Examples 19 | 20 | ```ruby 21 | require 'time' 22 | require 'lob' 23 | # setup authorization 24 | Lob.configure do |config| 25 | # Configure HTTP basic authorization: basicAuth 26 | config.username = 'YOUR USERNAME' 27 | config.password = 'YOUR PASSWORD' 28 | end 29 | 30 | api_instance = Lob::IdentityValidationApi.new 31 | multi_line_address = Lob::MultiLineAddress.new({primary_line: 'primary_line_example'}) # MultiLineAddress | 32 | 33 | begin 34 | # validate 35 | result = api_instance.validate(multi_line_address) 36 | p result 37 | rescue Lob::ApiError => e 38 | puts "Error when calling IdentityValidationApi->validate: #{e}" 39 | end 40 | ``` 41 | 42 | #### Using the identity_validation_with_http_info variant 43 | 44 | This returns an Array which contains the response data, status code and headers. 45 | 46 | > , Integer, Hash)> identity_validation_with_http_info(multi_line_address) 47 | 48 | ```ruby 49 | begin 50 | # validate 51 | data, status_code, headers = api_instance.identity_validation_with_http_info(multi_line_address) 52 | p status_code # => 2xx 53 | p headers # => { ... } 54 | p data # => 55 | rescue Lob::ApiError => e 56 | puts "Error when calling IdentityValidationApi->identity_validation_with_http_info: #{e}" 57 | end 58 | ``` 59 | 60 | ### Parameters 61 | 62 | | Name | Type | Description | Notes | 63 | | ---- | ---- | ----------- | ----- | 64 | | **multi_line_address** | [**MultiLineAddress**](MultiLineAddress.md) | | | 65 | 66 | ### Return type 67 | 68 | [**IdentityValidation**](IdentityValidation.md) 69 | 70 | ### Authorization 71 | 72 | [basicAuth](../README.md#basicAuth) 73 | 74 | ### HTTP request headers 75 | 76 | - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data 77 | - **Accept**: application/json 78 | 79 | -------------------------------------------------------------------------------- /spec/api/buckslip_orders_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::BuckslipOrdersApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'BuckslipOrdersApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::BuckslipOrdersApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of BuckslipOrdersApi' do 30 | it 'should create an instance of BuckslipOrdersApi' do 31 | expect(@api_instance).to be_instance_of(Lob::BuckslipOrdersApi) 32 | end 33 | end 34 | 35 | # unit tests for buckslip_order_create 36 | # create 37 | # Creates a new buckslip order given information 38 | # @param buckslip_id The ID of the buckslip to which the buckslip orders belong. 39 | # @param buckslip_order_editable 40 | # @param [Hash] opts the optional parameters 41 | # @return [BuckslipOrder] 42 | describe 'buckslip_order_create test' do 43 | it 'should work' do 44 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 45 | end 46 | end 47 | 48 | # unit tests for buckslip_orders_retrieve 49 | # get 50 | # Retrieves the buckslip orders associated with the given buckslip id. 51 | # @param buckslip_id The ID of the buckslip to which the buckslip orders belong. 52 | # @param [Hash] opts the optional parameters 53 | # @option opts [Integer] :limit How many results to return. 54 | # @option opts [Integer] :offset An integer that designates the offset at which to begin returning results. Defaults to 0. 55 | # @return [BuckslipOrdersList] 56 | describe 'buckslip_orders_retrieve test' do 57 | it 'should work' do 58 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 59 | end 60 | end 61 | 62 | end 63 | -------------------------------------------------------------------------------- /spec/api/intl_verifications_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::IntlVerificationsApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'IntlVerificationsApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::IntlVerificationsApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of IntlVerificationsApi' do 30 | it 'should create an instance of IntlVerificationsApi' do 31 | expect(@api_instance).to be_instance_of(Lob::IntlVerificationsApi) 32 | end 33 | end 34 | 35 | # unit tests for bulk_intl_verifications 36 | # verifyBulk 37 | # Verify a list of international (except US or US territories) address with a live API key. 38 | # @param intl_verifications_payload 39 | # @param [Hash] opts the optional parameters 40 | # @return [IntlVerifications] 41 | describe 'bulk_intl_verifications test' do 42 | it 'should work' do 43 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 44 | end 45 | end 46 | 47 | # unit tests for intl_verification 48 | # verifySingle 49 | # Verify an international (except US or US territories) address with a live API key. 50 | # @param intl_verification_writable 51 | # @param [Hash] opts the optional parameters 52 | # @option opts [String] :x_lang_output * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. 53 | # @return [IntlVerification] 54 | describe 'intl_verification test' do 55 | it 'should work' do 56 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 57 | end 58 | end 59 | 60 | end 61 | -------------------------------------------------------------------------------- /docs/Card.md: -------------------------------------------------------------------------------- 1 | # Lob::Card 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `card_`. | | 8 | | **url** | **String** | The signed link for the card. | | 9 | | **auto_reorder** | **Boolean** | True if the cards should be auto-reordered. | [default to false] | 10 | | **reorder_quantity** | **Integer** | The number of cards to be reordered. Only present when auto_reorder is True. | [optional] | 11 | | **raw_url** | **String** | The raw URL of the card. | [optional] | 12 | | **front_original_url** | **String** | The original URL of the front template. | [optional] | 13 | | **back_original_url** | **String** | The original URL of the back template. | [optional] | 14 | | **thumbnails** | [**Array<Thumbnail>**](Thumbnail.md) | | | 15 | | **available_quantity** | **Integer** | The available quantity of cards. | [default to 0] | 16 | | **pending_quantity** | **Integer** | The pending quantity of cards. | [default to 0] | 17 | | **status** | **String** | | [optional] | 18 | | **orientation** | **String** | The orientation of the card. | [optional][default to 'horizontal'] | 19 | | **threshold_amount** | **Integer** | The threshold amount of the card | [optional][default to 0] | 20 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | | 21 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | | 22 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 23 | | **object** | **String** | object | [default to 'card'] | 24 | | **description** | **String** | Description of the card. | [optional] | 25 | | **size** | **String** | The size of the card | [default to '2.125x3.375'] | 26 | 27 | ## Example 28 | 29 | ```ruby 30 | require 'lob' 31 | 32 | instance = Lob::Card.new( 33 | id: null, 34 | url: null, 35 | auto_reorder: null, 36 | reorder_quantity: null, 37 | raw_url: null, 38 | front_original_url: null, 39 | back_original_url: null, 40 | thumbnails: null, 41 | available_quantity: null, 42 | pending_quantity: null, 43 | status: null, 44 | orientation: null, 45 | threshold_amount: null, 46 | date_created: null, 47 | date_modified: null, 48 | deleted: null, 49 | object: null, 50 | description: null, 51 | size: null 52 | ) 53 | ``` 54 | 55 | -------------------------------------------------------------------------------- /docs/TrackingEventCertified.md: -------------------------------------------------------------------------------- 1 | # Lob::TrackingEventCertified 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **type** | **String** | a Certified letter tracking event | | 8 | | **name** | **String** | Name of tracking event for Certified letters. Letters sent with USPS Certified Mail are fully tracked by USPS, therefore their tracking events have an additional details object with more detailed information about the tracking event. Some certified tracking event names have multiple meanings, noted in the list here. See the description of the details object for the full set of combined certified tracking event name meanings. * `Mailed` - Package has been accepted into the carrier network for delivery. * `In Transit` - Maps to four distinct stages of transit. * `In Local Area` - Package is at a location near the end destination. * `Processed for Delivery` - Maps to two distinct stages of delivery. * `Pickup Available` - Package is available for pickup at carrier location. * `Delivered` - Package has been delivered. * `Re-Routed` - Package has been forwarded. * `Returned to Sender` - Package is to be returned to sender. * `Issue` - Maps to (at least) 15 possible issues, some of which are actionable. | | 9 | | **details** | [**TrackingEventDetails**](TrackingEventDetails.md) | | [optional] | 10 | | **location** | **String** | The zip code in which the event occurred if it exists, otherwise will be the name of a Regional Distribution Center if it exists, otherwise will be null. | [optional] | 11 | | **id** | **String** | Unique identifier prefixed with `evnt_`. | | 12 | | **time** | **Time** | A timestamp in ISO 8601 format of the date USPS registered the event. | [optional] | 13 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | | 14 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | | 15 | | **object** | **String** | | [default to 'tracking_event'] | 16 | 17 | ## Example 18 | 19 | ```ruby 20 | require 'lob' 21 | 22 | instance = Lob::TrackingEventCertified.new( 23 | type: null, 24 | name: null, 25 | details: null, 26 | location: null, 27 | id: null, 28 | time: null, 29 | date_created: null, 30 | date_modified: null, 31 | object: null 32 | ) 33 | ``` 34 | 35 | -------------------------------------------------------------------------------- /docs/AddressDomestic.md: -------------------------------------------------------------------------------- 1 | # Lob::AddressDomestic 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **address_line1** | **String** | The building number, street name, street suffix, and any street directionals. For US addresses, the max length is 64 characters. | [optional] | 8 | | **address_line2** | **String** | The suite or apartment number of the recipient address, if applicable. For US addresses, the max length is 64 characters. | [optional] | 9 | | **address_city** | **String** | | [optional] | 10 | | **address_state** | **String** | | [optional] | 11 | | **address_zip** | **String** | Optional postal code. For US addresses, must be either 5 or 9 digits. | [optional] | 12 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 13 | | **name** | **String** | Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. | [optional] | 14 | | **company** | **String** | Either `name` or `company` is required, you may also add both. | [optional] | 15 | | **phone** | **String** | Must be no longer than 40 characters. | [optional] | 16 | | **email** | **String** | Must be no longer than 100 characters. | [optional] | 17 | | **address_country** | **String** | The country associated with this address. | [optional] | 18 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 19 | 20 | ## Example 21 | 22 | ```ruby 23 | require 'lob' 24 | 25 | instance = Lob::AddressDomestic.new( 26 | address_line1: null, 27 | address_line2: null, 28 | address_city: null, 29 | address_state: null, 30 | address_zip: null, 31 | description: null, 32 | name: null, 33 | company: null, 34 | phone: null, 35 | email: null, 36 | address_country: null, 37 | metadata: null 38 | ) 39 | ``` 40 | 41 | -------------------------------------------------------------------------------- /docs/AddressDomesticExpanded.md: -------------------------------------------------------------------------------- 1 | # Lob::AddressDomesticExpanded 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **address_line1** | **String** | The building number, street name, street suffix, and any street directionals. For US addresses, the max length is 64 characters. | [optional] | 8 | | **address_line2** | **String** | The suite or apartment number of the recipient address, if applicable. For US addresses, the max length is 64 characters. | [optional] | 9 | | **address_city** | **String** | | [optional] | 10 | | **address_state** | **String** | | [optional] | 11 | | **address_zip** | **String** | Optional postal code. For US addresses, must be either 5 or 9 digits. | [optional] | 12 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 13 | | **name** | **String** | Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. | [optional] | 14 | | **company** | **String** | Either `name` or `company` is required, you may also add both. | [optional] | 15 | | **phone** | **String** | Must be no longer than 40 characters. | [optional] | 16 | | **email** | **String** | Must be no longer than 100 characters. | [optional] | 17 | | **address_country** | **String** | The country associated with this address. | [optional] | 18 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 19 | 20 | ## Example 21 | 22 | ```ruby 23 | require 'lob' 24 | 25 | instance = Lob::AddressDomesticExpanded.new( 26 | address_line1: null, 27 | address_line2: null, 28 | address_city: null, 29 | address_state: null, 30 | address_zip: null, 31 | description: null, 32 | name: null, 33 | company: null, 34 | phone: null, 35 | email: null, 36 | address_country: null, 37 | metadata: null 38 | ) 39 | ``` 40 | 41 | -------------------------------------------------------------------------------- /docs/UsVerificationsWritable.md: -------------------------------------------------------------------------------- 1 | # Lob::UsVerificationsWritable 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **address** | **String** | The entire address in one string (e.g., \"2261 Market Street 94114\"). _Does not support a recipient and will error when other payload parameters are provided._ | [optional] | 8 | | **recipient** | **String** | The intended recipient, typically a person's or firm's name. | [optional] | 9 | | **primary_line** | **String** | 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` | [optional] | 10 | | **secondary_line** | **String** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional] | 11 | | **urbanization** | **String** | 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. | [optional] | 12 | | **city** | **String** | | [optional] | 13 | | **state** | **String** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. | [optional] | 14 | | **zip_code** | **String** | 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`). | [optional] | 15 | | **transient_id** | **String** | ID that is returned in the response body for the verification | [optional] | 16 | 17 | ## Example 18 | 19 | ```ruby 20 | require 'lob' 21 | 22 | instance = Lob::UsVerificationsWritable.new( 23 | address: null, 24 | recipient: null, 25 | primary_line: null, 26 | secondary_line: null, 27 | urbanization: null, 28 | city: null, 29 | state: null, 30 | zip_code: null, 31 | transient_id: null 32 | ) 33 | ``` 34 | 35 | -------------------------------------------------------------------------------- /docs/UsVerificationOrError.md: -------------------------------------------------------------------------------- 1 | # Lob::UsVerificationOrError 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `us_ver_`. | [optional] | 8 | | **recipient** | **String** | The intended recipient, typically a person's or firm's name. | [optional] | 9 | | **primary_line** | **String** | 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` | [optional] | 10 | | **secondary_line** | **String** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional] | 11 | | **urbanization** | **String** | 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. | [optional] | 12 | | **last_line** | **String** | | [optional] | 13 | | **deliverability** | **String** | | [optional] | 14 | | **components** | [**UsComponents**](UsComponents.md) | | [optional] | 15 | | **deliverability_analysis** | [**DeliverabilityAnalysis**](DeliverabilityAnalysis.md) | | [optional] | 16 | | **lob_confidence_score** | [**LobConfidenceScore**](LobConfidenceScore.md) | | [optional] | 17 | | **object** | **String** | | [optional][default to 'us_verification'] | 18 | | **transient_id** | **String** | ID that is returned in the response body for the verification | [optional] | 19 | | **error** | [**BulkError**](BulkError.md) | | [optional] | 20 | 21 | ## Example 22 | 23 | ```ruby 24 | require 'lob' 25 | 26 | instance = Lob::UsVerificationOrError.new( 27 | id: null, 28 | recipient: null, 29 | primary_line: null, 30 | secondary_line: null, 31 | urbanization: null, 32 | last_line: null, 33 | deliverability: null, 34 | components: null, 35 | deliverability_analysis: null, 36 | lob_confidence_score: null, 37 | object: null, 38 | transient_id: null, 39 | error: null 40 | ) 41 | ``` 42 | 43 | -------------------------------------------------------------------------------- /docs/CampaignCreative.md: -------------------------------------------------------------------------------- 1 | # Lob::CampaignCreative 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `crv_`. | [optional] | 8 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 9 | | **from** | [**AnyType**](.md) | Must either be an address ID or an inline object with correct address parameters. | [optional] | 10 | | **resource_type** | **String** | Mailpiece type for the creative | [optional] | 11 | | **details** | [**AnyType**](.md) | Either PostcardDetailsReturned or LetterDetailsReturned | [optional] | 12 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 13 | | **template_preview_urls** | **Object** | Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets. | [optional] | 14 | | **template_previews** | **Array<Object>** | A list of template preview objects if the creative uses HTML template(s) as artwork asset(s). | [optional] | 15 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 16 | | **campaigns** | [**Array<Campaign>**](Campaign.md) | | [optional] | 17 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] | 18 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] | 19 | | **object** | **String** | Value is resource type. | [optional][default to 'creative'] | 20 | 21 | ## Example 22 | 23 | ```ruby 24 | require 'lob' 25 | 26 | instance = Lob::CampaignCreative.new( 27 | id: null, 28 | description: null, 29 | from: null, 30 | resource_type: null, 31 | details: null, 32 | metadata: null, 33 | template_preview_urls: null, 34 | template_previews: null, 35 | deleted: null, 36 | campaigns: null, 37 | date_created: null, 38 | date_modified: null, 39 | object: null 40 | ) 41 | ``` 42 | 43 | -------------------------------------------------------------------------------- /spec/api/us_verifications_api_spec.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Lob 3 | 4 | #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.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? 5 | 6 | The version of the OpenAPI document: 1.3.0 7 | Contact: lob-openapi@lob.com 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 5.2.1 10 | 11 | =end 12 | 13 | require 'spec_helper' 14 | require 'json' 15 | 16 | # Unit tests for Lob::UsVerificationsApi 17 | # Automatically generated by openapi-generator (https://openapi-generator.tech) 18 | # Please update as you see appropriate 19 | describe 'UsVerificationsApi' do 20 | before do 21 | # run before each test 22 | @api_instance = Lob::UsVerificationsApi.new 23 | end 24 | 25 | after do 26 | # run after each test 27 | end 28 | 29 | describe 'test an instance of UsVerificationsApi' do 30 | it 'should create an instance of UsVerificationsApi' do 31 | expect(@api_instance).to be_instance_of(Lob::UsVerificationsApi) 32 | end 33 | end 34 | 35 | # unit tests for bulk_us_verifications 36 | # verifyBulk 37 | # Verify a list of US or US territory addresses with a live API key. 38 | # @param multiple_components_list 39 | # @param [Hash] opts the optional parameters 40 | # @option opts [String] :_case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. 41 | # @return [UsVerifications] 42 | describe 'bulk_us_verifications test' do 43 | it 'should work' do 44 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 45 | end 46 | end 47 | 48 | # unit tests for us_verification 49 | # verifySingle 50 | # Verify a US or US territory address with a live API key. 51 | # @param us_verifications_writable 52 | # @param [Hash] opts the optional parameters 53 | # @option opts [String] :_case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. 54 | # @return [UsVerification] 55 | describe 'us_verification test' do 56 | it 'should work' do 57 | # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers 58 | end 59 | end 60 | 61 | end 62 | -------------------------------------------------------------------------------- /docs/CreativeResponse.md: -------------------------------------------------------------------------------- 1 | # Lob::CreativeResponse 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `crv_`. | [optional] | 8 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 9 | | **from** | [**AnyType**](.md) | Must either be an address ID or an inline object with correct address parameters. | [optional] | 10 | | **resource_type** | **String** | Mailpiece type for the creative | [optional] | 11 | | **details** | [**AnyType**](.md) | Either PostcardDetailsReturned or LetterDetailsReturned | [optional] | 12 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 13 | | **template_preview_urls** | **Object** | Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets. | [optional] | 14 | | **template_previews** | **Array<Object>** | A list of template preview objects if the creative uses HTML template(s) as artwork asset(s). | [optional] | 15 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 16 | | **campaigns** | [**Array<Campaign>**](Campaign.md) | Array of campaigns associated with the creative ID | [optional] | 17 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] | 18 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] | 19 | | **object** | **String** | Value is resource type. | [optional][default to 'creative'] | 20 | 21 | ## Example 22 | 23 | ```ruby 24 | require 'lob' 25 | 26 | instance = Lob::CreativeResponse.new( 27 | id: null, 28 | description: null, 29 | from: null, 30 | resource_type: null, 31 | details: null, 32 | metadata: null, 33 | template_preview_urls: null, 34 | template_previews: null, 35 | deleted: null, 36 | campaigns: null, 37 | date_created: null, 38 | date_modified: null, 39 | object: null 40 | ) 41 | ``` 42 | 43 | -------------------------------------------------------------------------------- /docs/Buckslip.md: -------------------------------------------------------------------------------- 1 | # Lob::Buckslip 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **id** | **String** | Unique identifier prefixed with `bck_`. | | 8 | | **auto_reorder** | **Boolean** | True if the buckslips should be auto-reordered. | [default to false] | 9 | | **reorder_quantity** | **Integer** | The number of buckslips to be reordered. | | 10 | | **threshold_amount** | **Integer** | The threshold amount of the buckslip | [default to 0] | 11 | | **url** | **String** | The signed link for the buckslip. | | 12 | | **raw_url** | **String** | The raw URL of the buckslip. | | 13 | | **front_original_url** | **String** | The original URL of the front template. | | 14 | | **back_original_url** | **String** | The original URL of the back template. | | 15 | | **thumbnails** | [**Array<Thumbnail>**](Thumbnail.md) | | | 16 | | **available_quantity** | **Float** | The available quantity of buckslips. | [default to 0] | 17 | | **allocated_quantity** | **Float** | The allocated quantity of buckslips. | [default to 0] | 18 | | **onhand_quantity** | **Float** | The onhand quantity of buckslips. | [default to 0] | 19 | | **pending_quantity** | **Float** | The pending quantity of buckslips. | [default to 0] | 20 | | **projected_quantity** | **Float** | The sum of pending and onhand quantities of buckslips. | [default to 0] | 21 | | **buckslip_orders** | [**Array<BuckslipOrder>**](BuckslipOrder.md) | An array of buckslip orders that are associated with the buckslip. | | 22 | | **stock** | **String** | | | 23 | | **weight** | **String** | | | 24 | | **finish** | **String** | | | 25 | | **status** | **String** | | | 26 | | **object** | **String** | object | [default to 'buckslip'] | 27 | | **description** | **String** | Description of the buckslip. | | 28 | | **size** | **String** | The size of the buckslip | [optional][default to '8.75x3.75'] | 29 | 30 | ## Example 31 | 32 | ```ruby 33 | require 'lob' 34 | 35 | instance = Lob::Buckslip.new( 36 | id: null, 37 | auto_reorder: null, 38 | reorder_quantity: null, 39 | threshold_amount: null, 40 | url: null, 41 | raw_url: null, 42 | front_original_url: null, 43 | back_original_url: null, 44 | thumbnails: null, 45 | available_quantity: null, 46 | allocated_quantity: null, 47 | onhand_quantity: null, 48 | pending_quantity: null, 49 | projected_quantity: null, 50 | buckslip_orders: null, 51 | stock: null, 52 | weight: null, 53 | finish: null, 54 | status: null, 55 | object: null, 56 | description: null, 57 | size: null 58 | ) 59 | ``` 60 | 61 | -------------------------------------------------------------------------------- /docs/BankAccount.md: -------------------------------------------------------------------------------- 1 | # Lob::BankAccount 2 | 3 | ## Properties 4 | 5 | | Name | Type | Description | Notes | 6 | | ---- | ---- | ----------- | ----- | 7 | | **description** | **String** | An internal description that identifies this resource. Must be no longer than 255 characters. | [optional] | 8 | | **routing_number** | **String** | Must be a [valid US routing number](https://www.frbservices.org/index.html). | | 9 | | **account_number** | **String** | | | 10 | | **account_type** | **String** | The type of entity that holds the account. | | 11 | | **signatory** | **String** | The signatory associated with your account. This name will be printed on checks created with this bank account. If you prefer to use a custom signature image on your checks instead, please create your bank account from the [Dashboard](https://dashboard.lob.com/#/login). | | 12 | | **metadata** | **Hash<String, String>** | Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. | [optional] | 13 | | **id** | **String** | Unique identifier prefixed with `bank_`. | | 14 | | **signature_url** | **String** | A signed link to the signature image. will be generated. | [optional] | 15 | | **bank_name** | **String** | The name of the bank based on the provided routing number, e.g. `JPMORGAN CHASE BANK`. | [optional] | 16 | | **verified** | **Boolean** | A bank account must be verified before a check can be created. | [optional][default to false] | 17 | | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | | 18 | | **date_modified** | **Time** | A timestamp in ISO 8601 format of the date the resource was last modified. | | 19 | | **deleted** | **Boolean** | Only returned if the resource has been successfully deleted. | [optional] | 20 | | **object** | **String** | | [default to 'bank_account'] | 21 | 22 | ## Example 23 | 24 | ```ruby 25 | require 'lob' 26 | 27 | instance = Lob::BankAccount.new( 28 | description: null, 29 | routing_number: null, 30 | account_number: null, 31 | account_type: null, 32 | signatory: null, 33 | metadata: null, 34 | id: null, 35 | signature_url: null, 36 | bank_name: null, 37 | verified: null, 38 | date_created: null, 39 | date_modified: null, 40 | deleted: null, 41 | object: null 42 | ) 43 | ``` 44 | 45 | --------------------------------------------------------------------------------