2525 "CanadaPostAccount" ,
2626]
2727OAUTH_CUSTOM_WORKFLOW_CARRIERS = [
28- "AmazonShippingAccount"
28+ "AmazonShippingAccount" ,
29+ ]
30+ MAERSK_CUSTOM_WORKFLOW_CARRIERS = [
31+ "MaerskAccount"
2932]
3033
3134def main ():
@@ -119,7 +122,7 @@ def add_credential_structure(carrier_output: str, carrier: dict[str, str]) -> st
119122 carrier_output += end
120123 carrier_output = carrier_output .replace (f"{ LINE_BREAK_CHARS } { END_CHARS } " , f"{ END_CHARS } " )
121124
122- # Default (aggregation) cURL
125+ # Default (aggregation) cURL
123126 default_output = f'# { carrier .get ("type" )} (EasyPost Aggregation)\n '
124127 default_output = add_curl_line (default_output , carrier )
125128 default_output = add_headers (default_output , carrier )
@@ -146,6 +149,42 @@ def add_credential_structure(carrier_output: str, carrier: dict[str, str]) -> st
146149 default_file .write (re .sub (r"^.*?\n" , "" , default_output ))
147150
148151 return carrier_output
152+ # Maersk Parcel — custom static credential structure
153+ elif carrier ["type" ] in MAERSK_CUSTOM_WORKFLOW_CARRIERS :
154+ carrier_account_json = {
155+ "carrier_account" : {
156+ "type" : "MaerskAccount" ,
157+ "description" : "Maersk Account" ,
158+ "reference" : None ,
159+ "credentials" : {
160+ "first_name" : "VALUE" ,
161+ "last_name" : "VALUE" ,
162+ "company_name" : "VALUE" ,
163+ "email" : "VALUE" ,
164+ "phone" : "VALUE" ,
165+ "daily_number_of_shipments" : "VALUE" ,
166+ "channel" : "VALUE" ,
167+ "accepted_terms" : "true" ,
168+ "serial_number" : "VALUE" ,
169+ "origin_address_line_1" : "VALUE" ,
170+ "origin_address_line_2" : "VALUE" ,
171+ "origin_postal_code" : "VALUE" ,
172+ "origin_city" : "VALUE" ,
173+ "origin_state" : "VALUE" ,
174+ "billing_address_line_1" : "VALUE" ,
175+ "billing_address_line_2" : "VALUE" ,
176+ "billing_postal_code" : "VALUE" ,
177+ "billing_city" : "VALUE" ,
178+ "billing_state" : "VALUE"
179+ },
180+ "test_credentials" : {}
181+ }
182+ }
183+
184+ carrier_output += f" -d '{ json .dumps (carrier_account_json , indent = 2 )} '"
185+ carrier_output += END_CHARS
186+ carrier_output = carrier_output .replace (f"{ LINE_BREAK_CHARS } { END_CHARS } " , f"{ END_CHARS } " )
187+ return carrier_output
149188 # Amazon Shipping
150189 elif carrier ["type" ] in OAUTH_CUSTOM_WORKFLOW_CARRIERS :
151190 carrier_account_json = {
0 commit comments