Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/openapi_client/api/buckslips_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def initialize(api_client = ApiClient.default)
# Creates a new buckslip given information
# @param buckslip_editable [BuckslipEditable]
# @param [Hash] opts the optional parameters
# @option opts [Object] :front An optional file upload as either a byte array or file type.
# @return [Buckslip]
def create(buckslip_editable, opts = {})
data, _status_code, _headers = buckslip_create_with_http_info(buckslip_editable, opts)
Expand All @@ -33,6 +34,7 @@ def create(buckslip_editable, opts = {})
# Creates a new buckslip given information
# @param buckslip_editable [BuckslipEditable]
# @param [Hash] opts the optional parameters
# @option opts [Object] :front An optional file upload as either a byte array or file type.
# @return [Array<(Buckslip, Integer, Hash)>] Buckslip data, response status code and response headers
def buckslip_create_with_http_info(buckslip_editable, opts = {})
if @api_client.config.debugging
Expand All @@ -47,6 +49,7 @@ def buckslip_create_with_http_info(buckslip_editable, opts = {})

# query parameters
query_params = opts[:query_params] || {}
query_params[:'front'] = opts[:'front'] if !opts[:'front'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
3 changes: 3 additions & 0 deletions lib/openapi_client/api/letters_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def letter_cancel_with_http_info(ltr_id, opts = {})
# @param letter_editable [LetterEditable]
# @param [Hash] opts the optional parameters
# @option opts [String] :idempotency_key A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request).
# @option opts [Object] :file An optional file upload as either a byte array or file type.
# @return [Letter]
def create(letter_editable, opts = {})
data, _status_code, _headers = letter_create_with_http_info(letter_editable, opts)
Expand All @@ -103,6 +104,7 @@ def create(letter_editable, opts = {})
# @param letter_editable [LetterEditable]
# @param [Hash] opts the optional parameters
# @option opts [String] :idempotency_key A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request).
# @option opts [Object] :file An optional file upload as either a byte array or file type.
# @return [Array<(Letter, Integer, Hash)>] Letter data, response status code and response headers
def letter_create_with_http_info(letter_editable, opts = {})
if @api_client.config.debugging
Expand All @@ -121,6 +123,7 @@ def letter_create_with_http_info(letter_editable, opts = {})

# query parameters
query_params = opts[:query_params] || {}
query_params[:'file'] = opts[:'file'] if !opts[:'file'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
160 changes: 80 additions & 80 deletions lib/openapi_client/api/uploads_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,85 @@ def export_retrieve_with_http_info(upl_id, ex_id, opts = {})
return data, status_code, headers
end

# create_upload
# get
# Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
# @param upl_id [String] id of the upload
# @param [Hash] opts the optional parameters
# @return [Upload]
def get(upl_id, opts = {})
data, _status_code, _headers = get_with_http_info(upl_id, opts)
data
end

# get
# Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
# @param upl_id [String] id of the upload
# @param [Hash] opts the optional parameters
# @return [Array<(Upload, Integer, Hash)>] Upload data, response status code and response headers
def get_with_http_info(upl_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UploadsApi.get ...'
end
# verify the required parameter 'upl_id' is set
if @api_client.config.client_side_validation && upl_id.nil?
fail ArgumentError, "Missing the required parameter 'upl_id' when calling UploadsApi.get"
end
pattern = Regexp.new(/^upl_[a-zA-Z0-9]+$/)
if @api_client.config.client_side_validation && upl_id !~ pattern
fail ArgumentError, "invalid value for 'upl_id' when calling UploadsApi.get, must conform to the pattern #{pattern}."
end

# resource path
local_var_path = '/uploads/{upl_id}'.sub('{' + 'upl_id' + '}', CGI.escape(upl_id.to_s))

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'Upload'

# auth_names
auth_names = opts[:debug_auth_names] || ['basicAuth']

new_options = opts.merge(
:operation => :"UploadsApi.get",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)

data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: UploadsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# create
# Creates a new upload with the provided properties.
# @param upload_writable [UploadWritable]
# @param [Hash] opts the optional parameters
# @return [Upload]
def create_upload(upload_writable, opts = {})
def create(upload_writable, opts = {})
data, _status_code, _headers = upload_create_with_http_info(upload_writable, opts)
data
end

# create_upload
# create
# Creates a new upload with the provided properties.
# @param upload_writable [UploadWritable]
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -166,17 +234,17 @@ def upload_create_with_http_info(upload_writable, opts = {})
return data, status_code, headers
end

# delete_upload
# delete
# Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.
# @param upl_id [String] id of the upload
# @param [Hash] opts the optional parameters
# @return [nil]
def delete_upload(upl_id, opts = {})
def delete(upl_id, opts = {})
upload_delete_with_http_info(upl_id, opts)
nil
end

# delete_upload
# delete
# Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.
# @param upl_id [String] id of the upload
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -389,86 +457,18 @@ def upload_file_create_with_http_info(upl_id, file, opts = {})
return data, status_code, headers
end

# get_upload
# Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
# @param upl_id [String] id of the upload
# @param [Hash] opts the optional parameters
# @return [Upload]
def get_upload(upl_id, opts = {})
data, _status_code, _headers = upload_retrieve_with_http_info(upl_id, opts)
data
end

# get_upload
# Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
# @param upl_id [String] id of the upload
# @param [Hash] opts the optional parameters
# @return [Array<(Upload, Integer, Hash)>] Upload data, response status code and response headers
def upload_retrieve_with_http_info(upl_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UploadsApi.upload_retrieve ...'
end
# verify the required parameter 'upl_id' is set
if @api_client.config.client_side_validation && upl_id.nil?
fail ArgumentError, "Missing the required parameter 'upl_id' when calling UploadsApi.upload_retrieve"
end
pattern = Regexp.new(/^upl_[a-zA-Z0-9]+$/)
if @api_client.config.client_side_validation && upl_id !~ pattern
fail ArgumentError, "invalid value for 'upl_id' when calling UploadsApi.upload_retrieve, must conform to the pattern #{pattern}."
end

# resource path
local_var_path = '/uploads/{upl_id}'.sub('{' + 'upl_id' + '}', CGI.escape(upl_id.to_s))

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'Upload'

# auth_names
auth_names = opts[:debug_auth_names] || ['basicAuth']

new_options = opts.merge(
:operation => :"UploadsApi.upload_retrieve",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)

data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: UploadsApi#upload_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# update_upload
# update
# Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.
# @param upl_id [String] id of the upload
# @param upload_updatable [UploadUpdatable]
# @param [Hash] opts the optional parameters
# @return [Upload]
def update_upload(upl_id, upload_updatable, opts = {})
def update(upl_id, upload_updatable, opts = {})
data, _status_code, _headers = upload_update_with_http_info(upl_id, upload_updatable, opts)
data
end

# update_upload
# update
# Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.
# @param upl_id [String] id of the upload
# @param upload_updatable [UploadUpdatable]
Expand Down Expand Up @@ -536,17 +536,17 @@ def upload_update_with_http_info(upl_id, upload_updatable, opts = {})
return data, status_code, headers
end

# list_upload
# list
# Returns a list of your uploads. Optionally, filter uploads by campaign.
# @param [Hash] opts the optional parameters
# @option opts [String] :campaign_id id of the campaign
# @return [Array<Upload>]
def list_upload(opts = {})
def list(opts = {})
data, _status_code, _headers = uploads_list_with_http_info(opts)
data
end

# list_upload
# list
# Returns a list of your uploads. Optionally, filter uploads by campaign.
# @param [Hash] opts the optional parameters
# @option opts [String] :campaign_id id of the campaign
Expand Down
10 changes: 5 additions & 5 deletions lib/openapi_client/models/bank_account.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Lob

#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?

The version of the OpenAPI document: 1.3.0
Contact: lob-openapi@lob.com
Expand All @@ -15,7 +15,7 @@

module Lob
class BankAccount
# An internal description that identifies this resource. Must be no longer than 255 characters.
# An internal description that identifies this resource. Must be no longer than 255 characters.
attr_accessor :description

# Must be a [valid US routing number](https://www.frbservices.org/index.html).
Expand Down Expand Up @@ -257,7 +257,7 @@ def list_invalid_properties
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
end

pattern = Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
pattern = Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
if !@signature_url.nil? && @signature_url !~ pattern
invalid_properties.push("invalid value for \"signature_url\", must conform to the pattern #{pattern}.")
end
Expand Down Expand Up @@ -293,7 +293,7 @@ def valid?
return false if @signatory.to_s.length > 30
return false if @id.nil?
return false if @id !~ Regexp.new(/^bank_[a-zA-Z0-9]+$/)
return false if !@signature_url.nil? && @signature_url !~ Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
return false if !@signature_url.nil? && @signature_url !~ Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
return false if @date_created.nil?
return false if @date_modified.nil?
return false if @object.nil?
Expand Down Expand Up @@ -392,7 +392,7 @@ def id=(id)
# Custom attribute writer method with validation
# @param [Object] signature_url Value to be assigned
def signature_url=(signature_url)
pattern = Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
pattern = Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
if !signature_url.nil? && signature_url !~ pattern
fail ArgumentError, "invalid value for \"signature_url\", must conform to the pattern #{pattern}."
end
Expand Down
10 changes: 5 additions & 5 deletions lib/openapi_client/models/check.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=begin
#Lob

#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
#The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?

The version of the OpenAPI document: 1.3.0
Contact: lob-openapi@lob.com
Expand All @@ -22,7 +22,7 @@ class Check

attr_accessor :from

# An internal description that identifies this resource. Must be no longer than 255 characters.
# An internal description that identifies this resource. Must be no longer than 255 characters.
attr_accessor :description

# 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.
Expand Down Expand Up @@ -402,7 +402,7 @@ def list_invalid_properties
invalid_properties.push('invalid value for "url", url cannot be nil.')
end

pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
if @url !~ pattern
invalid_properties.push("invalid value for \"url\", must conform to the pattern #{pattern}.")
end
Expand Down Expand Up @@ -447,7 +447,7 @@ def valid?
return false if !@check_bottom_template_version_id.nil? && @check_bottom_template_version_id !~ Regexp.new(/^vrsn_[a-zA-Z0-9]+$/)
return false if !@attachment_template_version_id.nil? && @attachment_template_version_id !~ Regexp.new(/^vrsn_[a-zA-Z0-9]+$/)
return false if @url.nil?
return false if @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
return false if @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
return false if @carrier.nil?
carrier_validator = EnumAttributeValidator.new('String', ["USPS"])
return false unless carrier_validator.valid?(@carrier)
Expand Down Expand Up @@ -605,7 +605,7 @@ def url=(url)
fail ArgumentError, 'url cannot be nil'
end

pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
if url !~ pattern
fail ArgumentError, "invalid value for \"url\", must conform to the pattern #{pattern}."
end
Expand Down
Empty file modified lib/openapi_client/models/chk_use_type.rb
100644 → 100755
Empty file.
Loading