Why when I test the email p variable it returns <No data returned> vs null? However in the actual json the value of email is null. What is the difference? The
?response.variables that return <No data returned> are breaking my insert statement. How do I handle the absent? Is something being lost in the parse to the response variable? Can someone explain this?
?response.variables that return <No data returned> are breaking my insert statement. How do I handle the absent? Is something being lost in the parse to the response variable? Can someone explain this?
contents = cf_1.GetContent()
response = json_parse(contents)
?response
= account_balance = 0
created = 1521805569
currency = <No data returned>
default_source = "card_1C8oLVJZDf9kgWQCaircxgoX"
delinquent = .F.
description = "somecust@email,com"
discount = <No data returned>
email = <No data returned>
id = "cus_CXu9dq2V6DO6nD"
invoice_prefix = "FD728D1"
livemode = .F.
+metadata.
object = "customer"
shipping = <No data returned>
+sources.
+subscriptions.
?response.object
= "customer"
?response.discount
= <No data returned>
?contents
= {
"id": "cus_CXu9dq2V6DO6nD",
"object": "customer",
"account_balance": 0,
"created": 1521805569,
"currency": null,
"default_source": "card_1C8oLVJZDf9kgWQCaircxgoX",
"delinquent": false,
"description": "somecust@email,com",
"discount": null,
"email": null,
"invoice_prefix": "FD728D1",
"livemode": false,
"metadata": {},
"shipping": null,
"sources": {
"object": "list",
"data": [
{
"id": "card_1C8oLVJZDf9kgWQCaircxgoX",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "Visa",
"country": "US",
"customer": "cus_CXu9dq2V6DO6nD",
"cvc_check": null,
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2019,
"fingerprint": "xfoivRTcO3QaIlXY",
"funding": "credit",
"last4": "4242",
"metadata": {},
"name": null,
"tokenization_method": null
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_CXu9dq2V6DO6nD/sources"
},
"subscriptions": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/customers/cus_CXu9dq2V6DO6nD/subscriptions"
}
}
?response.email
= <No data returned>
response = json_parse(contents)
?response
= account_balance = 0
created = 1521805569
currency = <No data returned>
default_source = "card_1C8oLVJZDf9kgWQCaircxgoX"
delinquent = .F.
description = "somecust@email,com"
discount = <No data returned>
email = <No data returned>
id = "cus_CXu9dq2V6DO6nD"
invoice_prefix = "FD728D1"
livemode = .F.
+metadata.
object = "customer"
shipping = <No data returned>
+sources.
+subscriptions.
?response.object
= "customer"
?response.discount
= <No data returned>
?contents
= {
"id": "cus_CXu9dq2V6DO6nD",
"object": "customer",
"account_balance": 0,
"created": 1521805569,
"currency": null,
"default_source": "card_1C8oLVJZDf9kgWQCaircxgoX",
"delinquent": false,
"description": "somecust@email,com",
"discount": null,
"email": null,
"invoice_prefix": "FD728D1",
"livemode": false,
"metadata": {},
"shipping": null,
"sources": {
"object": "list",
"data": [
{
"id": "card_1C8oLVJZDf9kgWQCaircxgoX",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "Visa",
"country": "US",
"customer": "cus_CXu9dq2V6DO6nD",
"cvc_check": null,
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2019,
"fingerprint": "xfoivRTcO3QaIlXY",
"funding": "credit",
"last4": "4242",
"metadata": {},
"name": null,
"tokenization_method": null
}
],
"has_more": false,
"total_count": 1,
"url": "/v1/customers/cus_CXu9dq2V6DO6nD/sources"
},
"subscriptions": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/customers/cus_CXu9dq2V6DO6nD/subscriptions"
}
}
?response.email
= <No data returned>
Comment