-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sara Vasquez <[email protected]>
- Loading branch information
1 parent
81f2b2b
commit 9dc4bff
Showing
23 changed files
with
382 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!groovy | ||
def FAILED_STAGE | ||
|
||
pipeline { | ||
agent none | ||
|
||
environment { | ||
REPO_NAME = "braintree-python" | ||
SLACK_CHANNEL = "#auto-team-sdk-builds" | ||
} | ||
|
||
stages { | ||
stage("Audit") { | ||
parallel { | ||
|
||
// Runs a static code analysis scan and posts results to the PayPal Polaris server | ||
stage("Polaris") { | ||
agent { | ||
node { | ||
label "" | ||
customWorkspace "workspace/${REPO_NAME}" | ||
} | ||
} | ||
|
||
steps { | ||
polarisAudit() | ||
} | ||
|
||
post { | ||
failure { | ||
script { | ||
FAILED_STAGE = env.STAGE_NAME | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
// Runs a software composition analysis scan and posts results to the PayPal Black Duck server | ||
stage("Black Duck") { | ||
agent { | ||
node { | ||
label "" | ||
customWorkspace "workspace/${REPO_NAME}" | ||
} | ||
} | ||
|
||
steps { | ||
blackduckAudit(debug: "true") | ||
} | ||
|
||
post { | ||
failure { | ||
script { | ||
FAILED_STAGE = env.STAGE_NAME | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,40 +29,42 @@ class Customer(Resource): | |
An example of creating an customer with all available fields:: | ||
result = braintree.Customer.create({ | ||
"id": "my_customer_id", | ||
"company": "Some company", | ||
"email": "[email protected]", | ||
"fax": "123-555-1212", | ||
"first_name": "John", | ||
"last_name": "Doe", | ||
"phone": "123-555-1221", | ||
"website": "http://www.example.com", | ||
"credit_card": { | ||
"cardholder_name": "John Doe", | ||
"cvv": "123", | ||
"expiration_date": "12/2012", | ||
"number": "4111111111111111", | ||
"token": "my_token", | ||
"billing_address": { | ||
"first_name": "John", | ||
"last_name": "Doe", | ||
"company": "Braintree", | ||
"street_address": "111 First Street", | ||
"country_name": "United States of America", | ||
"extended_address": "Unit 1", | ||
"first_name": "John", | ||
"international_phone": { "country_code": "1", "national_number": "3121234567" }, | ||
"last_name": "Doe", | ||
"locality": "Chicago", | ||
"phone_number": "312-123-4567", | ||
"postal_code": "60606", | ||
"region": "IL", | ||
"country_name": "United States of America" | ||
"phone_number": "312-123-4567" | ||
"street_address": "111 First Street" | ||
}, | ||
"cardholder_name": "John Doe", | ||
"cvv": "123", | ||
"expiration_date": "12/2012", | ||
"number": "4111111111111111", | ||
"options": { | ||
"verify_card": True, | ||
"verification_amount": "2.00" | ||
} | ||
"verification_amount": "2.00", | ||
"verify_card": True | ||
}, | ||
"token": "my_token" | ||
}, | ||
"custom_fields": { | ||
"my_key": "some value" | ||
} | ||
}, | ||
"email": "[email protected]", | ||
"fax": "123-555-1212", | ||
"first_name": "John", | ||
"id": "my_customer_id", | ||
"international_phone": { "country_code": "1", "national_number": "3121234567" }, | ||
"last_name": "Doe", | ||
"phone": "123-555-1221", | ||
"website": "http://www.example.com" | ||
}) | ||
print(result.customer.id) | ||
|
@@ -74,18 +76,19 @@ class Customer(Resource): | |
|
||
def __repr__(self): | ||
detail_list = [ | ||
"id", | ||
"graphql_id", | ||
"company", | ||
"created_at", | ||
"email", | ||
"fax", | ||
"first_name", | ||
"graphql_id", | ||
"id", | ||
"international_phone", | ||
"last_name", | ||
"merchant_id", | ||
"phone", | ||
"updated_at", | ||
"website", | ||
"website" | ||
] | ||
|
||
return super(Customer, self).__repr__(detail_list) | ||
|
@@ -160,7 +163,9 @@ def update(customer_id, params=None): | |
@staticmethod | ||
def create_signature(): | ||
return [ | ||
"company", "email", "fax", "first_name", "id", "last_name", "phone", "website", "device_data", "payment_method_nonce", | ||
"company", "email", "fax", "first_name", "id", | ||
{"international_phone": ["country_code", "national_number"]}, | ||
"last_name", "phone", "website", "device_data", "payment_method_nonce", | ||
"device_session_id", "fraud_merchant_id", # NEXT_MAJOR_VERSION remove device_session_id and fraud_merchant_id | ||
{"risk_data": ["customer_browser", "customer_device_id", "customer_ip", "customer_location_zip", "customer_tenure"]}, | ||
{"credit_card": CreditCard.create_signature()}, | ||
|
@@ -189,7 +194,10 @@ def create_signature(): | |
@staticmethod | ||
def update_signature(): | ||
return [ | ||
"company", "email", "fax", "first_name", "id", "last_name", "phone", "website", "device_data", "device_session_id", "fraud_merchant_id", "payment_method_nonce", "default_payment_method_token", | ||
"company", "email", "fax", "first_name", "id", | ||
{"international_phone": ["country_code", "national_number"]}, | ||
"last_name", "phone", "website", "device_data", "device_session_id", | ||
"fraud_merchant_id", "payment_method_nonce", "default_payment_method_token", | ||
{"credit_card": CreditCard.signature("update_via_customer")}, | ||
{"apple_pay_card": ApplePayCard.signature()}, | ||
{"android_pay_card": AndroidPayCard.card_signature()}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Version = "4.28.0" | ||
Version = "4.29.0" |
Oops, something went wrong.