lob 6.0.0.pre.rc → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (412) hide show
  1. checksums.yaml +4 -4
  2. data/CODE_SNIPPETS.md +1871 -0
  3. data/Gemfile.lock +7 -7
  4. data/MIGRATION.md +174 -0
  5. data/README.md +10 -34
  6. data/__tests__/Api/Address.unit.rb +1 -1
  7. data/__tests__/Api/BankAccount.unit.rb +1 -1
  8. data/__tests__/Api/BillingGroup.unit.rb +1 -1
  9. data/__tests__/Api/Card.unit.rb +1 -1
  10. data/__tests__/Api/CardOrder.unit.rb +1 -1
  11. data/__tests__/Api/Check.unit.rb +1 -1
  12. data/__tests__/Api/IntlAutocompletion.unit.rb +1 -1
  13. data/__tests__/Api/IntlVerification.unit.rb +1 -1
  14. data/__tests__/Api/Letter.unit.rb +1 -1
  15. data/__tests__/Api/Postcard.unit.rb +1 -1
  16. data/__tests__/Api/Require.unit.rb +21 -0
  17. data/__tests__/Api/ReverseGeocodeLookup.unit.rb +1 -1
  18. data/__tests__/Api/SelfMailer.unit.rb +1 -1
  19. data/__tests__/Api/Template.unit.rb +1 -1
  20. data/__tests__/Api/TemplateVersion.unit.rb +1 -1
  21. data/__tests__/Api/UsAutocompletion.unit.rb +8 -8
  22. data/__tests__/Api/UsVerification.unit.rb +1 -1
  23. data/__tests__/Api/ZipLookup.unit.rb +1 -1
  24. data/__tests__/Integration/Address.spec.rb +3 -3
  25. data/__tests__/Integration/BankAccount.spec.rb +3 -3
  26. data/__tests__/Integration/BillingGroup.spec.rb +3 -3
  27. data/__tests__/Integration/Card.spec.rb +3 -3
  28. data/__tests__/Integration/CardOrder.spec.rb +3 -3
  29. data/__tests__/Integration/Check.spec.rb +3 -3
  30. data/__tests__/Integration/IntlAutocompletion.spec.rb +3 -3
  31. data/__tests__/Integration/IntlVerification.spec.rb +3 -3
  32. data/__tests__/Integration/Letter.spec.rb +3 -3
  33. data/__tests__/Integration/Postcard.spec.rb +3 -3
  34. data/__tests__/Integration/ReverseGeocodeLookup.spec.rb +1 -1
  35. data/__tests__/Integration/SelfMailer.spec.rb +15 -9
  36. data/__tests__/Integration/Template.spec.rb +3 -3
  37. data/__tests__/Integration/TemplateVersion.spec.rb +3 -3
  38. data/__tests__/Integration/UsAutocompletion.spec.rb +3 -3
  39. data/__tests__/Integration/UsVerification.spec.rb +3 -3
  40. data/__tests__/Integration/ZipLookup.spec.rb +1 -1
  41. data/__tests__/TestFixtures.rb +5 -5
  42. data/docs/Address.md +2 -2
  43. data/docs/AddressDeletion.md +2 -2
  44. data/docs/AddressDomestic.md +2 -2
  45. data/docs/AddressDomesticExpanded.md +2 -2
  46. data/docs/AddressEditable.md +2 -2
  47. data/docs/AddressList.md +2 -2
  48. data/docs/AddressesApi.md +18 -18
  49. data/docs/BankAccount.md +2 -2
  50. data/docs/BankAccountDeletion.md +2 -2
  51. data/docs/BankAccountList.md +2 -2
  52. data/docs/BankAccountVerify.md +2 -2
  53. data/docs/BankAccountWritable.md +2 -2
  54. data/docs/BankAccountsApi.md +23 -23
  55. data/docs/BankTypeEnum.md +2 -2
  56. data/docs/BillingGroup.md +2 -2
  57. data/docs/BillingGroupEditable.md +2 -2
  58. data/docs/BillingGroupList.md +2 -2
  59. data/docs/BillingGroupsApi.md +20 -20
  60. data/docs/Buckslip.md +2 -2
  61. data/docs/BuckslipDeletion.md +2 -2
  62. data/docs/BuckslipEditable.md +2 -2
  63. data/docs/BuckslipOrder.md +2 -2
  64. data/docs/BuckslipOrderEditable.md +2 -2
  65. data/docs/BuckslipOrdersApi.md +10 -10
  66. data/docs/BuckslipOrdersList.md +2 -2
  67. data/docs/BuckslipUpdatable.md +2 -2
  68. data/docs/BuckslipsApi.md +23 -23
  69. data/docs/BuckslipsList.md +2 -2
  70. data/docs/BulkError.md +2 -2
  71. data/docs/BulkErrorProperties.md +2 -2
  72. data/docs/Campaign.md +2 -2
  73. data/docs/CampaignCreative.md +2 -2
  74. data/docs/CampaignDeletion.md +2 -2
  75. data/docs/CampaignUpdatable.md +2 -2
  76. data/docs/CampaignWritable.md +2 -2
  77. data/docs/CampaignsApi.md +23 -23
  78. data/docs/CampaignsList.md +2 -2
  79. data/docs/Card.md +2 -2
  80. data/docs/CardDeletion.md +2 -2
  81. data/docs/CardEditable.md +2 -2
  82. data/docs/CardList.md +2 -2
  83. data/docs/CardOrder.md +2 -2
  84. data/docs/CardOrderEditable.md +2 -2
  85. data/docs/CardOrderList.md +2 -2
  86. data/docs/CardOrdersApi.md +10 -10
  87. data/docs/CardUpdatable.md +2 -2
  88. data/docs/CardsApi.md +23 -23
  89. data/docs/Check.md +2 -2
  90. data/docs/CheckDeletion.md +2 -2
  91. data/docs/CheckEditable.md +2 -2
  92. data/docs/CheckList.md +2 -2
  93. data/docs/ChecksApi.md +20 -20
  94. data/docs/CmpScheduleType.md +2 -2
  95. data/docs/CmpUseType.md +2 -2
  96. data/docs/CountryExtended.md +2 -2
  97. data/docs/CountryExtendedExpanded.md +2 -2
  98. data/docs/CreativePatch.md +2 -2
  99. data/docs/CreativeResponse.md +2 -2
  100. data/docs/CreativeWritable.md +2 -2
  101. data/docs/CreativesApi.md +15 -15
  102. data/docs/CustomEnvelopeReturned.md +2 -2
  103. data/docs/DefaultApi.md +5 -5
  104. data/docs/DeliverabilityAnalysis.md +2 -2
  105. data/docs/DpvFootnote.md +2 -2
  106. data/docs/EngineHtml.md +2 -2
  107. data/docs/EventType.md +2 -2
  108. data/docs/Events.md +2 -2
  109. data/docs/Export.md +2 -2
  110. data/docs/ExportModel.md +2 -2
  111. data/docs/GeocodeAddresses.md +2 -2
  112. data/docs/GeocodeComponents.md +2 -2
  113. data/docs/HTTPValidationError.md +2 -2
  114. data/docs/IdentityValidation.md +2 -2
  115. data/docs/IdentityValidationApi.md +6 -6
  116. data/docs/InlineObject.md +2 -2
  117. data/docs/IntlAutocompletions.md +2 -2
  118. data/docs/IntlAutocompletionsApi.md +6 -6
  119. data/docs/IntlAutocompletionsWritable.md +2 -2
  120. data/docs/IntlComponents.md +2 -2
  121. data/docs/IntlSuggestions.md +2 -2
  122. data/docs/IntlVerification.md +2 -2
  123. data/docs/IntlVerificationOrError.md +2 -2
  124. data/docs/IntlVerificationWritable.md +2 -2
  125. data/docs/IntlVerifications.md +2 -2
  126. data/docs/IntlVerificationsApi.md +11 -11
  127. data/docs/IntlVerificationsPayload.md +2 -2
  128. data/docs/Letter.md +2 -2
  129. data/docs/LetterCustomEnvelope.md +2 -2
  130. data/docs/LetterDeletion.md +2 -2
  131. data/docs/LetterDetailsReturned.md +2 -2
  132. data/docs/LetterDetailsWritable.md +2 -2
  133. data/docs/LetterEditable.md +2 -2
  134. data/docs/LetterList.md +2 -2
  135. data/docs/LettersApi.md +20 -20
  136. data/docs/LobConfidenceScore.md +2 -2
  137. data/docs/LobError.md +2 -2
  138. data/docs/Location.md +2 -2
  139. data/docs/LocationAnalysis.md +2 -2
  140. data/docs/MailType.md +2 -2
  141. data/docs/MultiLineAddress.md +2 -2
  142. data/docs/MultipleComponents.md +2 -2
  143. data/docs/MultipleComponentsIntl.md +2 -2
  144. data/docs/MultipleComponentsList.md +2 -2
  145. data/docs/PlaceholderModel.md +2 -2
  146. data/docs/Postcard.md +2 -2
  147. data/docs/PostcardDeletion.md +2 -2
  148. data/docs/PostcardDetailsReturned.md +2 -2
  149. data/docs/PostcardDetailsWritable.md +2 -2
  150. data/docs/PostcardEditable.md +2 -2
  151. data/docs/PostcardList.md +2 -2
  152. data/docs/PostcardSize.md +2 -2
  153. data/docs/PostcardsApi.md +21 -21
  154. data/docs/QrCode.md +2 -2
  155. data/docs/ReturnEnvelope.md +2 -2
  156. data/docs/ReverseGeocode.md +2 -2
  157. data/docs/ReverseGeocodeLookupsApi.md +6 -6
  158. data/docs/SelfMailer.md +2 -2
  159. data/docs/SelfMailerDeletion.md +2 -2
  160. data/docs/SelfMailerEditable.md +2 -2
  161. data/docs/SelfMailerList.md +2 -2
  162. data/docs/SelfMailerSize.md +2 -2
  163. data/docs/SelfMailersApi.md +21 -21
  164. data/docs/SortBy.md +2 -2
  165. data/docs/SortBy1.md +2 -2
  166. data/docs/SortBy2.md +2 -2
  167. data/docs/SortBy3.md +2 -2
  168. data/docs/SortByDateModified.md +2 -2
  169. data/docs/Suggestions.md +2 -2
  170. data/docs/Template.md +2 -2
  171. data/docs/TemplateDeletion.md +2 -2
  172. data/docs/TemplateList.md +2 -2
  173. data/docs/TemplateUpdate.md +2 -2
  174. data/docs/TemplateVersion.md +2 -2
  175. data/docs/TemplateVersionDeletion.md +2 -2
  176. data/docs/TemplateVersionList.md +2 -2
  177. data/docs/TemplateVersionUpdatable.md +2 -2
  178. data/docs/TemplateVersionWritable.md +2 -2
  179. data/docs/TemplateVersionsApi.md +23 -23
  180. data/docs/TemplateWritable.md +2 -2
  181. data/docs/TemplatesApi.md +23 -23
  182. data/docs/Thumbnail.md +2 -2
  183. data/docs/TrackingEventCertified.md +2 -2
  184. data/docs/TrackingEventDetails.md +2 -2
  185. data/docs/TrackingEventNormal.md +2 -2
  186. data/docs/Upload.md +2 -2
  187. data/docs/UploadCreateExport.md +2 -2
  188. data/docs/UploadFile.md +2 -2
  189. data/docs/UploadState.md +2 -2
  190. data/docs/UploadUpdatable.md +2 -2
  191. data/docs/UploadWritable.md +2 -2
  192. data/docs/UploadsApi.md +36 -36
  193. data/docs/UsAutocompletions.md +2 -2
  194. data/docs/UsAutocompletionsApi.md +6 -6
  195. data/docs/UsAutocompletionsWritable.md +2 -2
  196. data/docs/UsComponents.md +2 -2
  197. data/docs/UsVerification.md +2 -2
  198. data/docs/UsVerificationOrError.md +2 -2
  199. data/docs/UsVerifications.md +2 -2
  200. data/docs/UsVerificationsApi.md +11 -11
  201. data/docs/UsVerificationsWritable.md +2 -2
  202. data/docs/ValidationError.md +2 -2
  203. data/docs/Zip.md +2 -2
  204. data/docs/ZipCodeType.md +2 -2
  205. data/docs/ZipEditable.md +2 -2
  206. data/docs/ZipLookupCity.md +2 -2
  207. data/docs/ZipLookupsApi.md +6 -6
  208. data/lib/lob.rb +1 -0
  209. data/lib/openapi_client/api/addresses_api.rb +1 -1
  210. data/lib/openapi_client/api/bank_accounts_api.rb +1 -1
  211. data/lib/openapi_client/api/billing_groups_api.rb +1 -1
  212. data/lib/openapi_client/api/buckslip_orders_api.rb +1 -1
  213. data/lib/openapi_client/api/buckslips_api.rb +1 -1
  214. data/lib/openapi_client/api/campaigns_api.rb +1 -1
  215. data/lib/openapi_client/api/card_orders_api.rb +1 -1
  216. data/lib/openapi_client/api/cards_api.rb +1 -1
  217. data/lib/openapi_client/api/checks_api.rb +1 -1
  218. data/lib/openapi_client/api/creatives_api.rb +1 -1
  219. data/lib/openapi_client/api/default_api.rb +1 -1
  220. data/lib/openapi_client/api/identity_validation_api.rb +1 -1
  221. data/lib/openapi_client/api/intl_autocompletions_api.rb +1 -1
  222. data/lib/openapi_client/api/intl_verifications_api.rb +1 -1
  223. data/lib/openapi_client/api/letters_api.rb +1 -1
  224. data/lib/openapi_client/api/postcards_api.rb +1 -1
  225. data/lib/openapi_client/api/reverse_geocode_lookups_api.rb +1 -1
  226. data/lib/openapi_client/api/self_mailers_api.rb +1 -1
  227. data/lib/openapi_client/api/template_versions_api.rb +1 -1
  228. data/lib/openapi_client/api/templates_api.rb +1 -1
  229. data/lib/openapi_client/api/uploads_api.rb +1 -1
  230. data/lib/openapi_client/api/us_autocompletions_api.rb +1 -1
  231. data/lib/openapi_client/api/us_verifications_api.rb +1 -1
  232. data/lib/openapi_client/api/zip_lookups_api.rb +1 -1
  233. data/lib/openapi_client/api_client.rb +2 -2
  234. data/lib/openapi_client/api_error.rb +1 -1
  235. data/lib/openapi_client/configuration.rb +1 -1
  236. data/lib/openapi_client/models/address.rb +4 -4
  237. data/lib/openapi_client/models/address_deletion.rb +4 -4
  238. data/lib/openapi_client/models/address_domestic.rb +4 -4
  239. data/lib/openapi_client/models/address_domestic_expanded.rb +4 -4
  240. data/lib/openapi_client/models/address_editable.rb +4 -4
  241. data/lib/openapi_client/models/address_list.rb +4 -4
  242. data/lib/openapi_client/models/bank_account.rb +4 -4
  243. data/lib/openapi_client/models/bank_account_deletion.rb +4 -4
  244. data/lib/openapi_client/models/bank_account_list.rb +4 -4
  245. data/lib/openapi_client/models/bank_account_verify.rb +4 -4
  246. data/lib/openapi_client/models/bank_account_writable.rb +4 -4
  247. data/lib/openapi_client/models/bank_type_enum.rb +1 -1
  248. data/lib/openapi_client/models/billing_group.rb +4 -4
  249. data/lib/openapi_client/models/billing_group_editable.rb +4 -4
  250. data/lib/openapi_client/models/billing_group_list.rb +4 -4
  251. data/lib/openapi_client/models/buckslip.rb +4 -4
  252. data/lib/openapi_client/models/buckslip_deletion.rb +4 -4
  253. data/lib/openapi_client/models/buckslip_editable.rb +4 -4
  254. data/lib/openapi_client/models/buckslip_order.rb +4 -4
  255. data/lib/openapi_client/models/buckslip_order_editable.rb +4 -4
  256. data/lib/openapi_client/models/buckslip_orders_list.rb +4 -4
  257. data/lib/openapi_client/models/buckslip_updatable.rb +4 -4
  258. data/lib/openapi_client/models/buckslips_list.rb +4 -4
  259. data/lib/openapi_client/models/bulk_error.rb +4 -4
  260. data/lib/openapi_client/models/bulk_error_properties.rb +4 -4
  261. data/lib/openapi_client/models/campaign.rb +4 -4
  262. data/lib/openapi_client/models/campaign_creative.rb +4 -4
  263. data/lib/openapi_client/models/campaign_deletion.rb +4 -4
  264. data/lib/openapi_client/models/campaign_updatable.rb +4 -4
  265. data/lib/openapi_client/models/campaign_writable.rb +4 -4
  266. data/lib/openapi_client/models/campaigns_list.rb +4 -4
  267. data/lib/openapi_client/models/card.rb +4 -4
  268. data/lib/openapi_client/models/card_deletion.rb +4 -4
  269. data/lib/openapi_client/models/card_editable.rb +4 -4
  270. data/lib/openapi_client/models/card_list.rb +4 -4
  271. data/lib/openapi_client/models/card_order.rb +4 -4
  272. data/lib/openapi_client/models/card_order_editable.rb +4 -4
  273. data/lib/openapi_client/models/card_order_list.rb +4 -4
  274. data/lib/openapi_client/models/card_updatable.rb +4 -4
  275. data/lib/openapi_client/models/check.rb +18 -8
  276. data/lib/openapi_client/models/check_deletion.rb +4 -4
  277. data/lib/openapi_client/models/check_editable.rb +18 -8
  278. data/lib/openapi_client/models/check_list.rb +4 -4
  279. data/lib/openapi_client/models/chk_use_type.rb +38 -0
  280. data/lib/openapi_client/models/cmp_schedule_type.rb +1 -1
  281. data/lib/openapi_client/models/cmp_use_type.rb +1 -1
  282. data/lib/openapi_client/models/country_extended.rb +1 -1
  283. data/lib/openapi_client/models/country_extended_expanded.rb +1 -1
  284. data/lib/openapi_client/models/creative_patch.rb +4 -4
  285. data/lib/openapi_client/models/creative_response.rb +4 -4
  286. data/lib/openapi_client/models/creative_writable.rb +5 -5
  287. data/lib/openapi_client/models/custom_envelope_returned.rb +4 -4
  288. data/lib/openapi_client/models/deliverability_analysis.rb +4 -4
  289. data/lib/openapi_client/models/dpv_footnote.rb +1 -1
  290. data/lib/openapi_client/models/engine_html.rb +1 -1
  291. data/lib/openapi_client/models/event_type.rb +4 -4
  292. data/lib/openapi_client/models/events.rb +4 -4
  293. data/lib/openapi_client/models/export.rb +4 -4
  294. data/lib/openapi_client/models/export_model.rb +4 -4
  295. data/lib/openapi_client/models/geocode_addresses.rb +4 -4
  296. data/lib/openapi_client/models/geocode_components.rb +4 -4
  297. data/lib/openapi_client/models/http_validation_error.rb +4 -4
  298. data/lib/openapi_client/models/identity_validation.rb +4 -4
  299. data/lib/openapi_client/models/inline_object.rb +4 -4
  300. data/lib/openapi_client/models/intl_autocompletions.rb +4 -4
  301. data/lib/openapi_client/models/intl_autocompletions_writable.rb +4 -4
  302. data/lib/openapi_client/models/intl_components.rb +4 -4
  303. data/lib/openapi_client/models/intl_suggestions.rb +4 -4
  304. data/lib/openapi_client/models/intl_verification.rb +4 -4
  305. data/lib/openapi_client/models/intl_verification_or_error.rb +4 -4
  306. data/lib/openapi_client/models/intl_verification_writable.rb +4 -4
  307. data/lib/openapi_client/models/intl_verifications.rb +4 -4
  308. data/lib/openapi_client/models/intl_verifications_payload.rb +4 -4
  309. data/lib/openapi_client/models/letter.rb +30 -9
  310. data/lib/openapi_client/models/letter_custom_envelope.rb +4 -4
  311. data/lib/openapi_client/models/letter_deletion.rb +4 -4
  312. data/lib/openapi_client/models/letter_details_returned.rb +5 -5
  313. data/lib/openapi_client/models/letter_details_writable.rb +4 -4
  314. data/lib/openapi_client/models/letter_editable.rb +18 -8
  315. data/lib/openapi_client/models/letter_list.rb +4 -4
  316. data/lib/openapi_client/models/lob_confidence_score.rb +4 -4
  317. data/lib/openapi_client/models/lob_error.rb +4 -4
  318. data/lib/openapi_client/models/location.rb +4 -4
  319. data/lib/openapi_client/models/location_analysis.rb +4 -4
  320. data/lib/openapi_client/models/ltr_use_type.rb +38 -0
  321. data/lib/openapi_client/models/mail_type.rb +1 -1
  322. data/lib/openapi_client/models/multi_line_address.rb +4 -4
  323. data/lib/openapi_client/models/multiple_components.rb +4 -4
  324. data/lib/openapi_client/models/multiple_components_intl.rb +4 -4
  325. data/lib/openapi_client/models/multiple_components_list.rb +4 -4
  326. data/lib/openapi_client/models/optional_address_column_mapping.rb +259 -0
  327. data/lib/openapi_client/models/placeholder_model.rb +4 -4
  328. data/lib/openapi_client/models/postcard.rb +18 -8
  329. data/lib/openapi_client/models/postcard_deletion.rb +4 -4
  330. data/lib/openapi_client/models/postcard_details_returned.rb +4 -4
  331. data/lib/openapi_client/models/postcard_details_writable.rb +4 -4
  332. data/lib/openapi_client/models/postcard_editable.rb +18 -8
  333. data/lib/openapi_client/models/postcard_list.rb +4 -4
  334. data/lib/openapi_client/models/postcard_size.rb +1 -1
  335. data/lib/openapi_client/models/psc_use_type.rb +38 -0
  336. data/lib/openapi_client/models/qr_code.rb +4 -4
  337. data/lib/openapi_client/models/required_address_column_mapping.rb +285 -0
  338. data/lib/openapi_client/models/return_envelope.rb +4 -4
  339. data/lib/openapi_client/models/reverse_geocode.rb +4 -4
  340. data/lib/openapi_client/models/self_mailer.rb +18 -8
  341. data/lib/openapi_client/models/self_mailer_deletion.rb +4 -4
  342. data/lib/openapi_client/models/self_mailer_editable.rb +18 -8
  343. data/lib/openapi_client/models/self_mailer_list.rb +4 -4
  344. data/lib/openapi_client/models/self_mailer_size.rb +1 -1
  345. data/lib/openapi_client/models/sfm_use_type.rb +38 -0
  346. data/lib/openapi_client/models/sort_by.rb +4 -4
  347. data/lib/openapi_client/models/sort_by1.rb +4 -4
  348. data/lib/openapi_client/models/sort_by2.rb +4 -4
  349. data/lib/openapi_client/models/sort_by3.rb +4 -4
  350. data/lib/openapi_client/models/sort_by_date_modified.rb +4 -4
  351. data/lib/openapi_client/models/suggestions.rb +4 -4
  352. data/lib/openapi_client/models/template.rb +4 -4
  353. data/lib/openapi_client/models/template_deletion.rb +4 -4
  354. data/lib/openapi_client/models/template_list.rb +4 -4
  355. data/lib/openapi_client/models/template_update.rb +4 -4
  356. data/lib/openapi_client/models/template_version.rb +4 -4
  357. data/lib/openapi_client/models/template_version_deletion.rb +4 -4
  358. data/lib/openapi_client/models/template_version_list.rb +4 -4
  359. data/lib/openapi_client/models/template_version_updatable.rb +4 -4
  360. data/lib/openapi_client/models/template_version_writable.rb +4 -4
  361. data/lib/openapi_client/models/template_writable.rb +4 -4
  362. data/lib/openapi_client/models/thumbnail.rb +4 -4
  363. data/lib/openapi_client/models/tracking_event_certified.rb +4 -4
  364. data/lib/openapi_client/models/tracking_event_details.rb +4 -4
  365. data/lib/openapi_client/models/tracking_event_normal.rb +4 -4
  366. data/lib/openapi_client/models/upload.rb +55 -48
  367. data/lib/openapi_client/models/upload_create_export.rb +4 -4
  368. data/lib/openapi_client/models/upload_file.rb +4 -4
  369. data/lib/openapi_client/models/upload_state.rb +1 -1
  370. data/lib/openapi_client/models/upload_updatable.rb +46 -19
  371. data/lib/openapi_client/models/upload_writable.rb +46 -30
  372. data/lib/openapi_client/models/uploads_metadata.rb +237 -0
  373. data/lib/openapi_client/models/us_autocompletions.rb +4 -4
  374. data/lib/openapi_client/models/us_autocompletions_writable.rb +4 -4
  375. data/lib/openapi_client/models/us_components.rb +7 -7
  376. data/lib/openapi_client/models/us_verification.rb +15 -5
  377. data/lib/openapi_client/models/us_verification_or_error.rb +4 -4
  378. data/lib/openapi_client/models/us_verifications.rb +4 -4
  379. data/lib/openapi_client/models/us_verifications_writable.rb +4 -4
  380. data/lib/openapi_client/models/validation_error.rb +4 -4
  381. data/lib/openapi_client/models/zip.rb +4 -4
  382. data/lib/openapi_client/models/zip_code_type.rb +1 -1
  383. data/lib/openapi_client/models/zip_editable.rb +4 -4
  384. data/lib/openapi_client/models/zip_lookup_city.rb +4 -4
  385. data/lib/openapi_client/version.rb +2 -2
  386. data/lib/openapi_client.rb +7 -0
  387. data/openapi_client.gemspec +1 -1
  388. data/spec/api/addresses_api_spec.rb +3 -3
  389. data/spec/api/bank_accounts_api_spec.rb +3 -3
  390. data/spec/api/billing_groups_api_spec.rb +3 -3
  391. data/spec/api/campaigns_api_spec.rb +3 -3
  392. data/spec/api/card_orders_api_spec.rb +3 -3
  393. data/spec/api/cards_api_spec.rb +3 -3
  394. data/spec/api/checks_api_spec.rb +3 -3
  395. data/spec/api/creatives_api_spec.rb +3 -3
  396. data/spec/api/default_api_spec.rb +3 -3
  397. data/spec/api/identity_validation_api_spec.rb +3 -3
  398. data/spec/api/intl_autocompletions_api_spec.rb +3 -3
  399. data/spec/api/intl_verifications_api_spec.rb +3 -3
  400. data/spec/api/letters_api_spec.rb +3 -3
  401. data/spec/api/postcards_api_spec.rb +3 -3
  402. data/spec/api/reverse_geocode_lookups_api_spec.rb +3 -3
  403. data/spec/api/self_mailers_api_spec.rb +3 -3
  404. data/spec/api/template_versions_api_spec.rb +3 -3
  405. data/spec/api/templates_api_spec.rb +3 -3
  406. data/spec/api/uploads_api_spec.rb +3 -3
  407. data/spec/api/us_autocompletions_api_spec.rb +3 -3
  408. data/spec/api/us_verifications_api_spec.rb +3 -3
  409. data/spec/api/zip_lookups_api_spec.rb +3 -3
  410. data/spec/api_client_spec.rb +29 -29
  411. data/spec/configuration_spec.rb +3 -3
  412. metadata +31 -20
@@ -13,15 +13,27 @@ OpenAPI Generator version: 5.2.1
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module Lob
17
17
  class UploadWritable
18
- # Unique identifier prefixed with `cmp_`.
19
18
  attr_accessor :campaign_id
20
19
 
20
+ attr_accessor :required_address_column_mapping
21
+
22
+ attr_accessor :optional_address_column_mapping
23
+
24
+ attr_accessor :metadata
25
+
26
+ # 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.
27
+ attr_accessor :merge_variable_column_mapping
28
+
21
29
  # Attribute mapping from ruby-style variable name to JSON key.
22
30
  def self.attribute_map
23
31
  {
24
- :'campaign_id' => :'campaignId'
32
+ :'campaign_id' => :'campaignId',
33
+ :'required_address_column_mapping' => :'requiredAddressColumnMapping',
34
+ :'optional_address_column_mapping' => :'optionalAddressColumnMapping',
35
+ :'metadata' => :'metadata',
36
+ :'merge_variable_column_mapping' => :'mergeVariableColumnMapping'
25
37
  }
26
38
  end
27
39
 
@@ -33,13 +45,18 @@ module OpenapiClient
33
45
  # Attribute type mapping.
34
46
  def self.openapi_types
35
47
  {
36
- :'campaign_id' => :'String'
48
+ :'campaign_id' => :'String',
49
+ :'required_address_column_mapping' => :'RequiredAddressColumnMapping',
50
+ :'optional_address_column_mapping' => :'OptionalAddressColumnMapping',
51
+ :'metadata' => :'UploadsMetadata',
52
+ :'merge_variable_column_mapping' => :'Object'
37
53
  }
38
54
  end
39
55
 
40
56
  # List of attributes with nullable: true
41
57
  def self.openapi_nullable
42
58
  Set.new([
59
+ :'merge_variable_column_mapping'
43
60
  ])
44
61
  end
45
62
 
@@ -47,13 +64,13 @@ module OpenapiClient
47
64
  # @param [Hash] attributes Model attributes in the form of hash
48
65
  def initialize(attributes = {})
49
66
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UploadWritable` initialize method"
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UploadWritable` initialize method"
51
68
  end
52
69
 
53
70
  # check to see if the attribute exists and convert string to symbol for hash key
54
71
  attributes = attributes.each_with_object({}) { |(k, v), h|
55
72
  if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UploadWritable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UploadWritable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
74
  end
58
75
  h[k.to_sym] = v
59
76
  }
@@ -61,6 +78,22 @@ module OpenapiClient
61
78
  if attributes.key?(:'campaign_id')
62
79
  self.campaign_id = attributes[:'campaign_id']
63
80
  end
81
+
82
+ if attributes.key?(:'required_address_column_mapping')
83
+ self.required_address_column_mapping = attributes[:'required_address_column_mapping']
84
+ end
85
+
86
+ if attributes.key?(:'optional_address_column_mapping')
87
+ self.optional_address_column_mapping = attributes[:'optional_address_column_mapping']
88
+ end
89
+
90
+ if attributes.key?(:'metadata')
91
+ self.metadata = attributes[:'metadata']
92
+ end
93
+
94
+ if attributes.key?(:'merge_variable_column_mapping')
95
+ self.merge_variable_column_mapping = attributes[:'merge_variable_column_mapping']
96
+ end
64
97
  end
65
98
 
66
99
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -71,11 +104,6 @@ module OpenapiClient
71
104
  invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.')
72
105
  end
73
106
 
74
- pattern = Regexp.new(/^cmp_[a-zA-Z0-9]+$/)
75
- if @campaign_id !~ pattern
76
- invalid_properties.push("invalid value for \"campaign_id\", must conform to the pattern #{pattern}.")
77
- end
78
-
79
107
  invalid_properties
80
108
  end
81
109
 
@@ -83,31 +111,19 @@ module OpenapiClient
83
111
  # @return true if the model is valid
84
112
  def valid?
85
113
  return false if @campaign_id.nil?
86
- return false if @campaign_id !~ Regexp.new(/^cmp_[a-zA-Z0-9]+$/)
87
114
  true
88
115
  end
89
116
 
90
- # Custom attribute writer method with validation
91
- # @param [Object] campaign_id Value to be assigned
92
- def campaign_id=(campaign_id)
93
- if campaign_id.nil?
94
- fail ArgumentError, 'campaign_id cannot be nil'
95
- end
96
-
97
- pattern = Regexp.new(/^cmp_[a-zA-Z0-9]+$/)
98
- if campaign_id !~ pattern
99
- fail ArgumentError, "invalid value for \"campaign_id\", must conform to the pattern #{pattern}."
100
- end
101
-
102
- @campaign_id = campaign_id
103
- end
104
-
105
117
  # Checks equality by comparing each attribute.
106
118
  # @param [Object] Object to be compared
107
119
  def ==(o)
108
120
  return true if self.equal?(o)
109
121
  self.class == o.class &&
110
- campaign_id == o.campaign_id
122
+ campaign_id == o.campaign_id &&
123
+ required_address_column_mapping == o.required_address_column_mapping &&
124
+ optional_address_column_mapping == o.optional_address_column_mapping &&
125
+ metadata == o.metadata &&
126
+ merge_variable_column_mapping == o.merge_variable_column_mapping
111
127
  end
112
128
 
113
129
  # @see the `==` method
@@ -119,7 +135,7 @@ module OpenapiClient
119
135
  # Calculates hash code according to all attributes.
120
136
  # @return [Integer] Hash code
121
137
  def hash
122
- [campaign_id].hash
138
+ [campaign_id, required_address_column_mapping, optional_address_column_mapping, metadata, merge_variable_column_mapping].hash
123
139
  end
124
140
 
125
141
 
@@ -199,7 +215,7 @@ module OpenapiClient
199
215
  end
200
216
  else # model
201
217
  # models (e.g. Pet) or oneOf
202
- klass = OpenapiClient.const_get(type)
218
+ klass = Lob.const_get(type)
203
219
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
220
  end
205
221
  end
@@ -0,0 +1,237 @@
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. <p> 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
+ # The list of column headers in your file as an array that you want as metadata associated with each mailpiece. See our <a href=\"https://help.lob.com/print-and-mail/building-a-mail-strategy/campaign-or-triggered-sends/campaign-audience-guide#required-columns-2\" target=\"_blank\">Campaign Audience Guide</a> for additional details.
18
+ class UploadsMetadata
19
+ # The list of column names from the csv file which you want associated with each of your mailpieces
20
+ attr_accessor :columns
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'columns' => :'columns'
26
+ }
27
+ end
28
+
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'columns' => :'Array<String>'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UploadsMetadata` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UploadsMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'columns')
63
+ if (value = attributes[:'columns']).is_a?(Array)
64
+ self.columns = value
65
+ end
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ if @columns.nil?
74
+ invalid_properties.push('invalid value for "columns", columns cannot be nil.')
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ return false if @columns.nil?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ columns == o.columns
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [columns].hash
105
+ end
106
+
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ new.build_from_hash(attributes)
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
+ self.send("#{key}=", nil) # // guardrails-disable-line
124
+ elsif type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) # // guardrails-disable-line
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil? && type.kind_of?(Array)
131
+ for base_type in type do
132
+ res = _deserialize(base_type, attributes[self.class.attribute_map[key]])
133
+ if !res.nil?
134
+ self.send("#{key}=", res) # // guardrails-disable-line
135
+ break
136
+ end
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) # // guardrails-disable-line
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = Lob.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr) # // guardrails-disable-line
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.2.1
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module Lob
17
17
  class UsAutocompletions
18
18
  # Unique identifier prefixed with `us_auto_`.
19
19
  attr_accessor :id
@@ -79,13 +79,13 @@ module OpenapiClient
79
79
  # @param [Hash] attributes Model attributes in the form of hash
80
80
  def initialize(attributes = {})
81
81
  if (!attributes.is_a?(Hash))
82
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsAutocompletions` initialize method"
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsAutocompletions` initialize method"
83
83
  end
84
84
 
85
85
  # check to see if the attribute exists and convert string to symbol for hash key
86
86
  attributes = attributes.each_with_object({}) { |(k, v), h|
87
87
  if (!self.class.attribute_map.key?(k.to_sym))
88
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsAutocompletions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsAutocompletions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
89
  end
90
90
  h[k.to_sym] = v
91
91
  }
@@ -272,7 +272,7 @@ module OpenapiClient
272
272
  end
273
273
  else # model
274
274
  # models (e.g. Pet) or oneOf
275
- klass = OpenapiClient.const_get(type)
275
+ klass = Lob.const_get(type)
276
276
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
277
277
  end
278
278
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.2.1
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module Lob
17
17
  class UsAutocompletionsWritable
18
18
  # Only accepts numbers and street names in an alphanumeric format.
19
19
  attr_accessor :address_prefix
@@ -67,13 +67,13 @@ module OpenapiClient
67
67
  # @param [Hash] attributes Model attributes in the form of hash
68
68
  def initialize(attributes = {})
69
69
  if (!attributes.is_a?(Hash))
70
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsAutocompletionsWritable` initialize method"
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsAutocompletionsWritable` initialize method"
71
71
  end
72
72
 
73
73
  # check to see if the attribute exists and convert string to symbol for hash key
74
74
  attributes = attributes.each_with_object({}) { |(k, v), h|
75
75
  if (!self.class.attribute_map.key?(k.to_sym))
76
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsAutocompletionsWritable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsAutocompletionsWritable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
77
  end
78
78
  h[k.to_sym] = v
79
79
  }
@@ -218,7 +218,7 @@ module OpenapiClient
218
218
  end
219
219
  else # model
220
220
  # models (e.g. Pet) or oneOf
221
- klass = OpenapiClient.const_get(type)
221
+ klass = Lob.const_get(type)
222
222
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
223
223
  end
224
224
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.2.1
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module Lob
17
17
  # A nested object containing a breakdown of each component of an address.
18
18
  class UsComponents
19
19
  # The numeric or alphanumeric part of an address preceding the street name. Often the house, building, or PO Box number.
@@ -194,13 +194,13 @@ module OpenapiClient
194
194
  # @param [Hash] attributes Model attributes in the form of hash
195
195
  def initialize(attributes = {})
196
196
  if (!attributes.is_a?(Hash))
197
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsComponents` initialize method"
197
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsComponents` initialize method"
198
198
  end
199
199
 
200
200
  # check to see if the attribute exists and convert string to symbol for hash key
201
201
  attributes = attributes.each_with_object({}) { |(k, v), h|
202
202
  if (!self.class.attribute_map.key?(k.to_sym))
203
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsComponents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
203
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsComponents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
204
204
  end
205
205
  h[k.to_sym] = v
206
206
  }
@@ -378,7 +378,7 @@ module OpenapiClient
378
378
  invalid_properties.push('invalid value for "zip_code", zip_code cannot be nil.')
379
379
  end
380
380
 
381
- pattern = Regexp.new(/^\d{5}$/)
381
+ pattern = Regexp.new(/(^$)|(^\d{5}$)/)
382
382
  if @zip_code !~ pattern
383
383
  invalid_properties.push("invalid value for \"zip_code\", must conform to the pattern #{pattern}.")
384
384
  end
@@ -454,7 +454,7 @@ module OpenapiClient
454
454
  return false if @state.nil?
455
455
  return false if @state.to_s.length > 2
456
456
  return false if @zip_code.nil?
457
- return false if @zip_code !~ Regexp.new(/^\d{5}$/)
457
+ return false if @zip_code !~ Regexp.new(/(^$)|(^\d{5}$)/)
458
458
  return false if @zip_code_plus_4.nil?
459
459
  return false if @zip_code_plus_4 !~ Regexp.new(/^(\d{4})?$/)
460
460
  return false if @zip_code_type.nil?
@@ -530,7 +530,7 @@ module OpenapiClient
530
530
  fail ArgumentError, 'zip_code cannot be nil'
531
531
  end
532
532
 
533
- pattern = Regexp.new(/^\d{5}$/)
533
+ pattern = Regexp.new(/(^$)|(^\d{5}$)/)
534
534
  if zip_code !~ pattern
535
535
  fail ArgumentError, "invalid value for \"zip_code\", must conform to the pattern #{pattern}."
536
536
  end
@@ -705,7 +705,7 @@ module OpenapiClient
705
705
  end
706
706
  else # model
707
707
  # models (e.g. Pet) or oneOf
708
- klass = OpenapiClient.const_get(type)
708
+ klass = Lob.const_get(type)
709
709
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
710
710
  end
711
711
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.2.1
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module Lob
17
17
  class UsVerification
18
18
  # Unique identifier prefixed with `us_ver_`.
19
19
  attr_accessor :id
@@ -36,6 +36,9 @@ module OpenapiClient
36
36
  # Summarizes the deliverability of the `us_verification` object. For full details, see the `deliverability_analysis` field. Possible values are: * `deliverable` – The address is deliverable by the USPS. * `deliverable_unnecessary_unit` – The address is deliverable, but the secondary unit information is unnecessary. * `deliverable_incorrect_unit` – The address is deliverable to the building's default address but the secondary unit provided may not exist. There is a chance the mail will not reach the intended recipient. * `deliverable_missing_unit` – The address is deliverable to the building's default address but is missing secondary unit information. There is a chance the mail will not reach the intended recipient. * `undeliverable` – The address is not deliverable according to the USPS.
37
37
  attr_accessor :deliverability
38
38
 
39
+ # This field indicates whether an address was found in a more comprehensive address dataset that includes sources from the USPS, open source mapping data, and our proprietary mail delivery data. This field can be interpreted as a representation of whether an address is a real location or not. Additionally a valid address may contradict the deliverability field since an address can be a real valid location but the USPS may not deliver to that address.
40
+ attr_accessor :valid_address
41
+
39
42
  attr_accessor :components
40
43
 
41
44
  attr_accessor :deliverability_analysis
@@ -76,6 +79,7 @@ module OpenapiClient
76
79
  :'urbanization' => :'urbanization',
77
80
  :'last_line' => :'last_line',
78
81
  :'deliverability' => :'deliverability',
82
+ :'valid_address' => :'valid_address',
79
83
  :'components' => :'components',
80
84
  :'deliverability_analysis' => :'deliverability_analysis',
81
85
  :'lob_confidence_score' => :'lob_confidence_score',
@@ -98,6 +102,7 @@ module OpenapiClient
98
102
  :'urbanization' => :'String',
99
103
  :'last_line' => :'String',
100
104
  :'deliverability' => :'String',
105
+ :'valid_address' => :'Boolean',
101
106
  :'components' => :'UsComponents',
102
107
  :'deliverability_analysis' => :'DeliverabilityAnalysis',
103
108
  :'lob_confidence_score' => :'LobConfidenceScore',
@@ -116,13 +121,13 @@ module OpenapiClient
116
121
  # @param [Hash] attributes Model attributes in the form of hash
117
122
  def initialize(attributes = {})
118
123
  if (!attributes.is_a?(Hash))
119
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsVerification` initialize method"
124
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsVerification` initialize method"
120
125
  end
121
126
 
122
127
  # check to see if the attribute exists and convert string to symbol for hash key
123
128
  attributes = attributes.each_with_object({}) { |(k, v), h|
124
129
  if (!self.class.attribute_map.key?(k.to_sym))
125
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsVerification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
130
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsVerification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
126
131
  end
127
132
  h[k.to_sym] = v
128
133
  }
@@ -155,6 +160,10 @@ module OpenapiClient
155
160
  self.deliverability = attributes[:'deliverability']
156
161
  end
157
162
 
163
+ if attributes.key?(:'valid_address')
164
+ self.valid_address = attributes[:'valid_address']
165
+ end
166
+
158
167
  if attributes.key?(:'components')
159
168
  self.components = attributes[:'components']
160
169
  end
@@ -300,6 +309,7 @@ module OpenapiClient
300
309
  urbanization == o.urbanization &&
301
310
  last_line == o.last_line &&
302
311
  deliverability == o.deliverability &&
312
+ valid_address == o.valid_address &&
303
313
  components == o.components &&
304
314
  deliverability_analysis == o.deliverability_analysis &&
305
315
  lob_confidence_score == o.lob_confidence_score &&
@@ -315,7 +325,7 @@ module OpenapiClient
315
325
  # Calculates hash code according to all attributes.
316
326
  # @return [Integer] Hash code
317
327
  def hash
318
- [id, recipient, primary_line, secondary_line, urbanization, last_line, deliverability, components, deliverability_analysis, lob_confidence_score, object].hash
328
+ [id, recipient, primary_line, secondary_line, urbanization, last_line, deliverability, valid_address, components, deliverability_analysis, lob_confidence_score, object].hash
319
329
  end
320
330
 
321
331
 
@@ -395,7 +405,7 @@ module OpenapiClient
395
405
  end
396
406
  else # model
397
407
  # models (e.g. Pet) or oneOf
398
- klass = OpenapiClient.const_get(type)
408
+ klass = Lob.const_get(type)
399
409
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
400
410
  end
401
411
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.2.1
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module Lob
17
17
  # A model used to represent an entry in a result list where the entry can either be a us_verification or an Error. The SDK will perform necessary casting into the correct corresponding type.
18
18
  class UsVerificationOrError
19
19
  # Unique identifier prefixed with `us_ver_`.
@@ -119,13 +119,13 @@ module OpenapiClient
119
119
  # @param [Hash] attributes Model attributes in the form of hash
120
120
  def initialize(attributes = {})
121
121
  if (!attributes.is_a?(Hash))
122
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsVerificationOrError` initialize method"
122
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsVerificationOrError` initialize method"
123
123
  end
124
124
 
125
125
  # check to see if the attribute exists and convert string to symbol for hash key
126
126
  attributes = attributes.each_with_object({}) { |(k, v), h|
127
127
  if (!self.class.attribute_map.key?(k.to_sym))
128
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsVerificationOrError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
128
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsVerificationOrError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
129
129
  end
130
130
  h[k.to_sym] = v
131
131
  }
@@ -403,7 +403,7 @@ module OpenapiClient
403
403
  end
404
404
  else # model
405
405
  # models (e.g. Pet) or oneOf
406
- klass = OpenapiClient.const_get(type)
406
+ klass = Lob.const_get(type)
407
407
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
408
408
  end
409
409
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.2.1
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module OpenapiClient
16
+ module Lob
17
17
  class UsVerifications
18
18
  attr_accessor :addresses
19
19
 
@@ -51,13 +51,13 @@ module OpenapiClient
51
51
  # @param [Hash] attributes Model attributes in the form of hash
52
52
  def initialize(attributes = {})
53
53
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsVerifications` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsVerifications` initialize method"
55
55
  end
56
56
 
57
57
  # check to see if the attribute exists and convert string to symbol for hash key
58
58
  attributes = attributes.each_with_object({}) { |(k, v), h|
59
59
  if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsVerifications`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsVerifications`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
61
  end
62
62
  h[k.to_sym] = v
63
63
  }
@@ -194,7 +194,7 @@ module OpenapiClient
194
194
  end
195
195
  else # model
196
196
  # models (e.g. Pet) or oneOf
197
- klass = OpenapiClient.const_get(type)
197
+ klass = Lob.const_get(type)
198
198
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
199
  end
200
200
  end