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
736 changes: 0 additions & 736 deletions lob_python/api/campaigns_api.py

This file was deleted.

458 changes: 0 additions & 458 deletions lob_python/api/creatives_api.py

This file was deleted.

1,124 changes: 0 additions & 1,124 deletions lob_python/api/uploads_api.py

This file was deleted.

2 changes: 1 addition & 1 deletion lob_python/model/bank_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class BankAccount(ModelNormal):
},
('signature_url',): {
'regex': {
'pattern': r'^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-_]+$', # noqa: E501
'pattern': r'^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$', # noqa: E501
},
},
}
Expand Down
4 changes: 3 additions & 1 deletion lob_python/model/campaign.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
)
from lob_python.exceptions import ApiAttributeError

from lob_python.model.campaign_creative import CampaignCreative
from lob_python.model.cmp_id import CmpId
from lob_python.model.cmp_schedule_type import CmpScheduleType
from lob_python.model.cmp_use_type import CmpUseType
from lob_python.model.metadata_model import MetadataModel
from lob_python.model.resource_description import ResourceDescription
globals()['CampaignCreative'] = CampaignCreative
globals()['CmpId'] = CmpId
globals()['CmpScheduleType'] = CmpScheduleType
globals()['CmpUseType'] = CmpUseType
Expand Down Expand Up @@ -273,7 +275,7 @@ def __init__(self, name, schedule_type, auto_cancel_if_ncoa, id, creatives, date
schedule_type (CmpScheduleType):
auto_cancel_if_ncoa (bool): Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA.
id (CmpId):
creatives (list): An array of creatives that have been associated with this campaign.
creatives ([CampaignCreative]): An array of creatives that have been associated with this campaign.
date_created (datetime): A timestamp in ISO 8601 format of the date the resource was created.
date_modified (datetime): A timestamp in ISO 8601 format of the date the resource was last modified.

Expand Down
111 changes: 75 additions & 36 deletions lob_python/model/upload_list.py → lob_python/model/campaign_creative.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@
)
from lob_python.exceptions import ApiAttributeError

from lob_python.model.upload import Upload
globals()['Upload'] = Upload
from lob_python.model.campaign import Campaign
from lob_python.model.crv_id import CrvId
from lob_python.model.metadata_model import MetadataModel
from lob_python.model.resource_description import ResourceDescription
globals()['Campaign'] = Campaign
globals()['CrvId'] = CrvId
globals()['MetadataModel'] = MetadataModel
globals()['ResourceDescription'] = ResourceDescription


class UploadList(ModelNormal):
class CampaignCreative(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech

Expand All @@ -58,9 +64,20 @@ class UploadList(ModelNormal):
"""

allowed_values = {
('resource_type',): {
'LETTER': "letter",
'POSTCARD': "postcard",
},
('object',): {
'CREATIVE': "creative",
},
}

validations = {
('campaigns',): {
'max_items': 0,
'min_items': 0,
},
}

@cached_property
Expand All @@ -75,6 +92,9 @@ def additional_properties_type():

@cached_property
def openapi_types():
from lob_python.model.address_editable import AddressEditable
from lob_python.model.postcard_details_writable import PostcardDetailsWritable
from lob_python.model.letter_details_writable import LetterDetailsWritable
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Expand All @@ -84,35 +104,40 @@ def openapi_types():
and the value is attribute type.
"""
return {
'data': (list, type(None)), # noqa: E501
'id': (str, type(None)), # noqa: E501
'description': (str, type(None)), # noqa: E501
'_from': (str, AddressEditable, type(None)), # noqa: E501
'resource_type': (str, type(None)), # noqa: E501
'details': (PostcardDetailsWritable, LetterDetailsWritable, type(None)), # noqa: E501
'metadata': (MetadataModel, type(None)), # noqa: E501
'template_preview_urls': (dict, type(None)), # noqa: E501
'template_previews': (list, type(None)), # noqa: E501
'deleted': (bool, type(None)), # noqa: E501
'campaigns': (list, type(None)), # noqa: E501
'date_created': (datetime, type(None)), # noqa: E501
'date_modified': (datetime, type(None)), # noqa: E501
'object': (str, type(None)), # noqa: E501
'next_url': (str, type(None)), # noqa: E501
'previous_url': (str, type(None)), # noqa: E501
'count': (int, type(None)), # noqa: E501
'total_count': (int, type(None)), # noqa: E501
}

@cached_property
def discriminator():
return None

def getNextPageToken(self):
if (self.next_url):
after_index = self.next_url.find("after=")
return self.next_url[after_index+6:]
def getPreviousPageToken(self):
if (self.previous_url):
before_index = self.previous_url.find("before=")
return self.previous_url[before_index+7:]


attribute_map = {
'data': 'data', # noqa: E501
'id': 'id', # noqa: E501
'description': 'description', # noqa: E501
'_from': 'from', # noqa: E501
'resource_type': 'resource_type', # noqa: E501
'details': 'details', # noqa: E501
'metadata': 'metadata', # noqa: E501
'template_preview_urls': 'template_preview_urls', # noqa: E501
'template_previews': 'template_previews', # noqa: E501
'deleted': 'deleted', # noqa: E501
'campaigns': 'campaigns', # noqa: E501
'date_created': 'date_created', # noqa: E501
'date_modified': 'date_modified', # noqa: E501
'object': 'object', # noqa: E501
'next_url': 'next_url', # noqa: E501
'previous_url': 'previous_url', # noqa: E501
'count': 'count', # noqa: E501
'total_count': 'total_count', # noqa: E501
}

read_only_vars = {
Expand All @@ -123,7 +148,7 @@ def getPreviousPageToken(self):
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""UploadList - a model defined in OpenAPI
"""CampaignCreative - a model defined in OpenAPI

Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
Expand Down Expand Up @@ -156,12 +181,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
data (list, type(None)): list of uploads. [optional] # noqa: E501
object (str, type(None)): Value is type of resource.. [optional] # noqa: E501
next_url (str, type(None)): url of next page of items in list.. [optional] # noqa: E501
previous_url (str, type(None)): url of previous page of items in list.. [optional] # noqa: E501
count (int, type(None)): number of resources in a set. [optional] # noqa: E501
total_count (int, type(None)): indicates the total number of records. Provided when the request specifies an \"include\" query parameter. [optional] # noqa: E501
id (str, type(None)): [optional] # noqa: E501
description (str, type(None)): [optional] # noqa: E501
_from (str, AddressEditable, type(None)): Must either be an address ID or an inline object with correct address parameters.. [optional] # noqa: E501
resource_type (str, type(None)): Mailpiece type for the creative. [optional] # noqa: E501
details (PostcardDetailsWritable, LetterDetailsWritable, type(None)): Either PostcardDetailsReturned or LetterDetailsReturned. [optional] # noqa: E501
metadata (MetadataModel, type(None)): [optional] # noqa: E501
template_preview_urls (dict, type(None)): Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets.. [optional] # noqa: E501
template_previews (list, type(None)): A list of template preview objects if the creative uses HTML template(s) as artwork asset(s).. [optional] # noqa: E501
deleted (bool, type(None)): Only returned if the resource has been successfully deleted.. [optional] # noqa: E501
campaigns (list, type(None)): [optional] # noqa: E501
date_created (datetime, type(None)): A timestamp in ISO 8601 format of the date the resource was created.. [optional] # noqa: E501
date_modified (datetime, type(None)): A timestamp in ISO 8601 format of the date the resource was last modified.. [optional] # noqa: E501
object (str, type(None)): Value is resource type.. [optional] if omitted the server will use the default value of "creative" # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -210,7 +242,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501

@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""UploadList - a model defined in OpenAPI
"""CampaignCreative - a model defined in OpenAPI

Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
Expand Down Expand Up @@ -243,12 +275,19 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
data (list, type(None)): list of uploads. [optional] # noqa: E501
object (str, type(None)): Value is type of resource.. [optional] # noqa: E501
next_url (str, type(None)): url of next page of items in list.. [optional] # noqa: E501
previous_url (str, type(None)): url of previous page of items in list.. [optional] # noqa: E501
count (int, type(None)): number of resources in a set. [optional] # noqa: E501
total_count (int, type(None)): indicates the total number of records. Provided when the request specifies an \"include\" query parameter. [optional] # noqa: E501
id (str, type(None)): [optional] # noqa: E501
description (str, type(None)): [optional] # noqa: E501
_from (str, AddressEditable, type(None)): Must either be an address ID or an inline object with correct address parameters.. [optional] # noqa: E501
resource_type (str, type(None)): Mailpiece type for the creative. [optional] # noqa: E501
details (PostcardDetailsWritable, LetterDetailsWritable, type(None)): Either PostcardDetailsReturned or LetterDetailsReturned. [optional] # noqa: E501
metadata (MetadataModel, type(None)): [optional] # noqa: E501
template_preview_urls (dict, type(None)): Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets.. [optional] # noqa: E501
template_previews (list, type(None)): A list of template preview objects if the creative uses HTML template(s) as artwork asset(s).. [optional] # noqa: E501
deleted (bool, type(None)): Only returned if the resource has been successfully deleted.. [optional] # noqa: E501
campaigns (list, type(None)): [optional] # noqa: E501
date_created (datetime, type(None)): A timestamp in ISO 8601 format of the date the resource was created.. [optional] # noqa: E501
date_modified (datetime, type(None)): A timestamp in ISO 8601 format of the date the resource was last modified.. [optional] # noqa: E501
object (str, type(None)): Value is resource type.. [optional] if omitted the server will use the default value of "creative" # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
12 changes: 9 additions & 3 deletions lob_python/model/upload_deletion.py → lob_python/model/campaign_deletion.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
)
from lob_python.exceptions import ApiAttributeError

from lob_python.model.cmp_id import CmpId
globals()['CmpId'] = CmpId


class UploadDeletion(ModelNormal):
class CampaignDeletion(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech

Expand Down Expand Up @@ -83,6 +85,7 @@ def openapi_types():
"""
return {
'id': (str, type(None)), # noqa: E501
'deleted': (bool, type(None)), # noqa: E501
}

@cached_property
Expand All @@ -92,6 +95,7 @@ def discriminator():

attribute_map = {
'id': 'id', # noqa: E501
'deleted': 'deleted', # noqa: E501
}

read_only_vars = {
Expand All @@ -102,7 +106,7 @@ def discriminator():
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""UploadDeletion - a model defined in OpenAPI
"""CampaignDeletion - a model defined in OpenAPI

Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
Expand Down Expand Up @@ -136,6 +140,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
id (str, type(None)): [optional] # noqa: E501
deleted (bool, type(None)): True if the resource has been successfully deleted.. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -184,7 +189,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501

@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""UploadDeletion - a model defined in OpenAPI
"""CampaignDeletion - a model defined in OpenAPI

Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
Expand Down Expand Up @@ -218,6 +223,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
id (str, type(None)): [optional] # noqa: E501
deleted (bool, type(None)): True if the resource has been successfully deleted.. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
Empty file modified lob_python/model/campaign_updatable.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/campaign_writable.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/campaigns_list.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/cmp_id.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/cmp_schedule_type.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/cmp_use_type.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/creative_patch.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/creative_response.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/creative_writable.py
100755 → 100644
Empty file.
Empty file modified lob_python/model/crv_id.py
100755 → 100644
Empty file.
Loading