ms-salesforce-api 3.5.0__py3-none-any.whl → 3.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,6 +84,7 @@ SELECT
84
84
  Year_Created__c,
85
85
  LKP_ParentOpportunity__c,
86
86
  TECH_Old_NewBusiness__c,
87
+ Project_Provider__c,
87
88
  (
88
89
  SELECT
89
90
  Description,
@@ -214,6 +214,7 @@ class OpportunityDTO(object):
214
214
  parent_opportunity,
215
215
  project_name,
216
216
  tech_old_new_business,
217
+ project_provider,
217
218
  ):
218
219
  self.opportunity_id = opportunity_id
219
220
  self.account_billing_country = account_billing_country
@@ -298,6 +299,7 @@ class OpportunityDTO(object):
298
299
  self.parent_opportunity = parent_opportunity
299
300
  self.project_name = project_name
300
301
  self.tech_old_new_business = tech_old_new_business
302
+ self.project_provider = project_provider
301
303
 
302
304
  @staticmethod
303
305
  def from_salesforce_record(record):
@@ -533,6 +535,7 @@ class OpportunityDTO(object):
533
535
  parent_opportunity=record["LKP_ParentOpportunity__c"],
534
536
  project_name=record["FRM_ProjectName__c"],
535
537
  tech_old_new_business=record["TECH_Old_NewBusiness__c"],
538
+ project_provider=record["Project_Provider__c"],
536
539
  )
537
540
 
538
541
  def to_dict(self):
@@ -620,4 +623,5 @@ class OpportunityDTO(object):
620
623
  "parent_opportunity": self.parent_opportunity,
621
624
  "project_name": self.project_name,
622
625
  "tech_old_new_business": self.tech_old_new_business,
626
+ "project_provider": self.project_provider,
623
627
  }
@@ -107,6 +107,7 @@ class BigQueryExporter:
107
107
  "parent_opportunity": "STRING",
108
108
  "project_name": "STRING",
109
109
  "tech_old_new_business": "Boolean",
110
+ "project_provider": "STRING",
110
111
  },
111
112
  "opportunity_line_item": {
112
113
  "opportunity_id": "STRING",
@@ -56,12 +56,22 @@ class ProjectDTO(object):
56
56
  except (KeyError, TypeError):
57
57
  return None
58
58
 
59
+ def _get_project_code():
60
+ try:
61
+ project_code = record["FRM_ProjectCode__c"]
62
+ if "*" in project_code:
63
+ project_code = project_code.replace("*", "0")
64
+
65
+ return project_code
66
+ except (KeyError, TypeError):
67
+ return None
68
+
59
69
  return ProjectDTO(
60
70
  id=record["Id"],
61
71
  account_customer_group_name=_get_account_customer_group_name(),
62
72
  account_name=_get_account_name(),
63
73
  project_name=record["FRM_ProjectName__c"],
64
- project_code=record["FRM_ProjectCode__c"],
74
+ project_code=_get_project_code(),
65
75
  project_status=record["PCK_ProjectStatus__c"],
66
76
  project_startdate=record["DT_ProjectStartDate__c"],
67
77
  project_enddate=record["DT_ProjectEndDate__c"],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ms-salesforce-api
3
- Version: 3.5.0
3
+ Version: 3.7.0
4
4
  Summary: Python library used to extract data from Salesforce API and migrate it to Bigquery and Postgres.
5
5
  License-File: LICENSE
6
6
  Author: Making Science
@@ -33,10 +33,10 @@ ms_salesforce_api/salesforce/api/lead/dto/__init__.py,sha256=47DEQpj8HBSa-_TImW-
33
33
  ms_salesforce_api/salesforce/api/lead/export_data/Bigquery.py,sha256=rym4GJCr-8dhzZZBtmh03wD8rzgRy5AptIJ5cI9zZqY,3789
34
34
  ms_salesforce_api/salesforce/api/lead/export_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  ms_salesforce_api/salesforce/api/opportunity/__init__.py,sha256=mPITW67LvqsuLBP1Mv4YCYkrKv_LiUP58PhmmojYEi0,1386
36
- ms_salesforce_api/salesforce/api/opportunity/constants.py,sha256=fqG1k_SOn0H-d3Koa9uawWkbyYF0RZwPKLdBPE2yXlY,5990
37
- ms_salesforce_api/salesforce/api/opportunity/dto/OpportunityDTO.py,sha256=oE2aMv5mBn-vN3QrgBURB9lkCo88zkEhXC8Cfo3ZtI0,25234
36
+ ms_salesforce_api/salesforce/api/opportunity/constants.py,sha256=Nj--JttCV0OYTh5r-CKbplfsar1qF1PoOiazk_zSnG4,6015
37
+ ms_salesforce_api/salesforce/api/opportunity/dto/OpportunityDTO.py,sha256=M_MDLmz3-AFgyJPNsqD0rSwF60mVSZ4WLvHcWkFWgRg,25424
38
38
  ms_salesforce_api/salesforce/api/opportunity/dto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- ms_salesforce_api/salesforce/api/opportunity/export_data/Bigquery.py,sha256=rB9Kun2ukhZlmEJNfYBM1reAg10SsremCqSzF-2xPeE,6988
39
+ ms_salesforce_api/salesforce/api/opportunity/export_data/Bigquery.py,sha256=WBsofCl9lPfaDollyriOUcZTcWLe0gc5fiCBfdjTMzo,7034
40
40
  ms_salesforce_api/salesforce/api/opportunity/export_data/CloudSQL.py,sha256=MbheXQhG9bwbW2FIA5onCum8CoDdl4eMIpUEUqCR3fE,6011
41
41
  ms_salesforce_api/salesforce/api/opportunity/export_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  ms_salesforce_api/salesforce/api/opportunity/export_data/__tests__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -85,13 +85,13 @@ ms_salesforce_api/salesforce/api/project/export_data/__tests__/__init__.py,sha25
85
85
  ms_salesforce_api/salesforce/api/project/export_data/__tests__/test_CloudSQL.py,sha256=Cn6eixLYMlAxTStG90zEvmLOYfgt3D2BSmPSUL2WKGA,13717
86
86
  ms_salesforce_api/salesforce/api/projects_with_backup/__init__.py,sha256=yZCN1ojh6LEqiGSUA5ULekqFbk8U7Cfn07HS-2U3w3Y,1559
87
87
  ms_salesforce_api/salesforce/api/projects_with_backup/constants.py,sha256=aAyzRlj0d0pHtxnvnp-d82PmPYn4z-A8YAylLK7jKcE,371
88
- ms_salesforce_api/salesforce/api/projects_with_backup/dto/ProjectDTO.py,sha256=Jvg0u0Y0f07A3YpVWpyLve96ghEZ2iVbJfHsD-9z9Bk,3133
88
+ ms_salesforce_api/salesforce/api/projects_with_backup/dto/ProjectDTO.py,sha256=ceywIOFl6MV1OF8tDAdMP7fAJmpWW0QcLPGNL8QOQrs,3448
89
89
  ms_salesforce_api/salesforce/api/projects_with_backup/dto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
90
  ms_salesforce_api/salesforce/api/projects_with_backup/export_data/Bigquery.py,sha256=xSx2ciIXcKMiZGt6HKUvZBpOE34rJoy50XLd8HVT7mE,2468
91
91
  ms_salesforce_api/salesforce/api/projects_with_backup/export_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
92
  ms_salesforce_api/salesforce/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
93
93
  ms_salesforce_api/salesforce/helpers/string.py,sha256=wRtMU_EFIihbZCyR_wPdQpLanPk2ejlddmiWyNwfi1Q,303
94
- ms_salesforce_api-3.5.0.dist-info/METADATA,sha256=-eX-0caK-ZdvEWAentcsqzqV52JtEuj8onmByxlmTQ0,9270
95
- ms_salesforce_api-3.5.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
96
- ms_salesforce_api-3.5.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
97
- ms_salesforce_api-3.5.0.dist-info/RECORD,,
94
+ ms_salesforce_api-3.7.0.dist-info/METADATA,sha256=g7WoF35tXr5XP4jAhEcJtyFbNxQPUWQM_suM0JGtmkc,9270
95
+ ms_salesforce_api-3.7.0.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
96
+ ms_salesforce_api-3.7.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
97
+ ms_salesforce_api-3.7.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.1
2
+ Generator: poetry-core 2.3.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any