Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a default start date for line items. also changed the config fi… #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Files/warranty.cfg.example
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ retry = 3
# 1. vendor - order number is returned from vendor ( only for Dell )
# 2. common - order number is randomly generated and same for all purchases
# 3. descrete - order number is randomly generated and uniqe for every purchase
order_no_type = vendor
order_no_type = common
6 changes: 6 additions & 0 deletions Files/warranty_meraki.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def process_result(self, result, purchases):
else:
order_no = self.generate_random_order_no()

stripped_serial_no = str(serial_number).replace('-', '').strip()

data.update({'order_no': order_no})
data.update({'completed': 'yes'})
data.update({'vendor': 'Meraki'})
Expand All @@ -93,9 +95,13 @@ def process_result(self, result, purchases):
data.update({'line_item_type': 'device'})
data.update({'line_completed': 'yes'})

data.update({'line_notes': stripped_serial_no})
data.update({'line_contract_id': stripped_serial_no})

# warranty - Note: Meraki product warranties are a combined average so there is no way of knowing start
# date for a particular device
data.update({'line_contract_type': 'Warranty'})
data.update({'line_start_date': "0001-01-01"})
data.update({'line_end_date': license_expiration})

all_data.append(copy.deepcopy(data))
Expand Down