We are using https://www.npmjs.com/package/botbuilder to build a bot for Microsoft Teams.
We have the following payload to create a card, which has an Input.ChoiceSet inside an Action.ShowCard card.
It works fine when I preview the card from the bar but it doesn't work after I send the card. Sometimes if I restart the MST client it works when I click on a card for the first time but then it doesn't work after that. Sometimes it never works, only from the preview.
It does work fine on Android but it doesn't work on Linux, Mac or web clients.
Here is a demo of the issue, https://www.loom.com/share/7cfec55b587941899cd66e1d896df065
And here is the payload. Try the Click me! button, which should display a dropdown.
{
"type":"message",
"attachments":[
{
"contentType":"application/vnd.microsoft.card.adaptive",
"content":{
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"version":"1.2",
"actions":[
{
"type":"Action.OpenUrl",
"title":"Action 1",
"url":"https://my.website.com"
},
{
"type":"Action.Submit",
"title":"Action 2",
"data":{
"command":"action 1",
"data":"asdasd"
}
},
{
"type":"Action.ShowCard",
"title":"Click me!",
"card":{
"type":"AdaptiveCard",
"version":"1.0",
"body":[
{
"type":"Input.ChoiceSet",
"id":"SelectUser",
"style":"compact",
"value":"1",
"choices":[
{
"title":"User 1",
"value":"1"
},
{
"title":"User 2",
"value":"2"
},
{
"title":"User 3",
"value":"3"
}
],
"height":"stretch",
"wrap":true,
"isMultiSelect":false
}
],
"actions":[
{
"type":"Action.Submit",
"title":"Action 3.1",
"data":{
"command":"action 3.1",
"data":"asdasd"
}
}
]
}
},
{
"type":"Action.ShowCard",
"title":"Action 4",
"card":{
"type":"AdaptiveCard",
"body":[
{
"type":"Input.Text",
"label":"Enter comment",
"style":"text",
"id":"text",
"isMultiline":true,
"placeholder":"Enter your comment"
}
],
"actions":[
{
"type":"Action.Submit",
"title":"Save",
"data":{
"command":"save",
"data":"asdasd"
}
}
]
}
}
],
"body":[
{
"type":"TextBlock",
"size":"medium",
"weight":"bolder",
"text":"text... text... text",
"wrap":true
},
{
"type":"ColumnSet",
"columns":[
{
"type":"Column",
"width":"auto",
"items":[
{
"type":"Image",
"style":"Person",
"url":"https://avatar.com/avatar.png",
"size":"small"
}
]
},
{
"type":"Column",
"width":"stretch",
"items":[
{
"type":"TextBlock",
"weight":"lighter",
"text":"text... text... text",
"wrap":true
},
{
"type":"TextBlock",
"spacing":"None",
"text":"text... text... text",
"isSubtle":true,
"wrap":true
}
]
}
]
},
{
"type":"Container",
"items":[
{
"columns":[
{
"spacing":"small",
"width":"auto",
"verticalContentAlignment":"Center",
"type":"Column",
"selectAction":{
"targetElements":[
"fields-content",
"showFields",
"hideFields"
],
"type":"Action.ToggleVisibility",
"title":"expand"
},
"items":[
{
"type":"TextBlock",
"id":"showFields",
"horizontalAlignment":"Left",
"color":"Accent",
"text":"Show fields",
"wrap":true
},
{
"type":"TextBlock",
"id":"hideFields",
"horizontalAlignment":"Left",
"color":"Accent",
"text":"Hide fields",
"wrap":true,
"isVisible":false
}
]
}
],
"type":"ColumnSet"
},
{
"id":"fields-content",
"isVisible":false,
"type":"Container",
"items":[
{
"type":"FactSet",
"facts":[
{
"title":"title",
"value":"value"
}
]
}
]
}
]
}
]
}
}
]
}
Currently we don't have the sample code in nodejs.Agree with you problem in using node library. I too tested with your payload.
Related
The following transaction
https://explorer.near.org/transactions/CkZYiXB3BEoXNuLDqcn5GjErkXghKGCB47yPyyze4kTf#BPYU8T3o5mdsU4ewG3JdCLRe8ivpsGTehKxkifFAsboD
failed whith the following error:
{
"type": "action",
"error": {
"type": "functionCallError",
"error": {
"type": "executionError",
"error": "Smart contract panicked: The contract is not initialized"
}
}
}
But what I got on the indexer is the following:
{
"outcome":{
"executionOutcome":{
"blockHash":"8NP4Z2i7CBQzRUxa8CfuummnYZvwfZaCFmif4d6mcgyB",
"id":"CkZYiXB3BEoXNuLDqcn5GjErkXghKGCB47yPyyze4kTf",
"outcome":{
"executorId":"test1.csandi.near",
"gasBurnt":2428211671420,
"logs":[
],
"metadata":{
"gasProfile":null,
"version":1
},
"receiptIds":[
"GrXdFKA9byvCmxGiQkGc9iaFn88FfePk4tfJhvcTGMwc"
],
"status":{
"SuccessReceiptId":"GrXdFKA9byvCmxGiQkGc9iaFn88FfePk4tfJhvcTGMwc"
},
"tokensBurnt":"242821167142000000000"
},
"proof":[
{
"direction":"Left",
"hash":"BWhmGBmvzbX3WBP1RZQ59DB749sHSV2xS5pNyF6xAbbh"
},
{
"direction":"Right",
"hash":"H4YMDcd9Fh68KTwyPTwYuFb89KhfdGUoxRbBYzDcNAze"
},
{
"direction":"Right",
"hash":"9jv152euKvurdVkDYS5FKiiT4ej6xL1gRYTHoNbjwEZi"
},
{
"direction":"Right",
"hash":"BqQFHzSYzqDE8tMQkJT8PHFGxLmQrkFBcuTqFP4nTjx7"
}
]
},
"receipt":null
},
"transaction":{
"actions":[
{
"FunctionCall":{
"args":"eyJpbml0aWFsX3ByaWNlIjoxLjksInNwYWNpbmciOjIsImFscGhhX2lkIjoidXNuIiwiYmV0YV9pZCI6IndyYXAubmVhciIsInN3YXBfZmVlX3JhdGUiOjAuMDAzLCJwcm90b2NvbF90b2xsIjowLjAxfQ==",
"deposit":"0",
"gas":200000000000000,
"methodName":"create_new_pool"
}
}
],
"hash":"CkZYiXB3BEoXNuLDqcn5GjErkXghKGCB47yPyyze4kTf",
"nonce":75627675000007,
"publicKey":"ed25519:85yAx5mY8DinTWQfMn47cZTHMhZtLRAWZLpazYmetwno",
"receiverId":"dev-cliquidity-perk-jorge.near",
"signature":"ed25519:1CieS8AUSc7Y3S8By8adJaEXXydXcjvSA1uVXPgrdhkmGPpf5ykA7XWqJGZnDhMtymkp6eWDBEQzsBXkhybAbUV",
"signerId":"test1.csandi.near"
}
}
So I would like to know if there is anyway to get the failure message from the indexer?
Look in the next blocks for the corresponding receipt from the SuccessReceiptId (id GrXdFKA9byvCmxGiQkGc9iaFn88FfePk4tfJhvcTGMwc), and in its execution outcome you will find that status.
I cannot recommend more to watch or read the Data Flow in NEAR
FYI, just to follow up and clarify for anyone with this question, after following the above response by "Vlad Frolov", in order to get the Receipt Status, I had to check
shard.receiptExecutionOutcomes
which will provide the results of the receipts, so I started to track the receipts that I am interested in, in this case for
SuccessReceiptId (GrXdFKA9byvCmxGiQkGc9iaFn88FfePk4tfJhvcTGMwc)
"executionOutcome":{
"blockHash":"59F5pES9Myc2VT4JkppE95epCwtGAXYux9okbzpsh95K",
"id":"**GrXdFKA9byvCmxGiQkGc9iaFn88FfePk4tfJhvcTGMwc**",
"outcome":{
"executorId":"dev-cliquidity-perk-jorge.near",
"gasBurnt":2824274578054,
"logs":[
],
"metadata":{
"gasProfile":[
{
"cost":"BASE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"1323840555"
},
{
"cost":"CONTRACT_LOADING_BASE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"35445963"
},
{
"cost":"CONTRACT_LOADING_BYTES",
"costCategory":"WASM_HOST_COST",
"gasUsed":"106584645000"
},
{
"cost":"READ_MEMORY_BASE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"5219726400"
},
{
"cost":"READ_MEMORY_BYTE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"136847988"
},
{
"cost":"READ_REGISTER_BASE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"2517165186"
},
{
"cost":"READ_REGISTER_BYTE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"11334630"
},
{
"cost":"STORAGE_READ_BASE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"56356845750"
},
{
"cost":"STORAGE_READ_KEY_BYTE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"154762665"
},
{
"cost":"TOUCHING_TRIE_NODE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"193223471112"
},
{
"cost":"UTF8_DECODING_BASE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"3111779061"
},
{
"cost":"UTF8_DECODING_BYTE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"9038994849"
},
{
"cost":"WASM_INSTRUCTION",
"costCategory":"WASM_HOST_COST",
"gasUsed":"11928316488"
},
{
"cost":"WRITE_MEMORY_BASE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"2803794861"
},
{
"cost":"WRITE_MEMORY_BYTE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"313233780"
},
{
"cost":"WRITE_REGISTER_BASE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"2865522486"
},
{
"cost":"WRITE_REGISTER_BYTE",
"costCategory":"WASM_HOST_COST",
"gasUsed":"437179860"
}
],
"version":1
},
"receiptIds":[
"BPYU8T3o5mdsU4ewG3JdCLRe8ivpsGTehKxkifFAsboD"
],
**"status":{
"Failure":{
"ActionError":{
"index":0,
"kind":{
"FunctionCallError":{
"ExecutionError":"Smart contract panicked: The contract is not initialized"
}
}
}
}**
},
"tokensBurnt":"282427457805400000000"
},
"proof":[
{
"direction":"Left",
"hash":"5j1RhLnf5jGChUPxU9CPNbAGwSn6VnzBw7taJe5vSnYD"
},
{
"direction":"Right",
"hash":"AJ2kARUcYAkzsL3xmw4jAETZ61jtQuswf7RvhSxscKCR"
},
{
"direction":"Left",
"hash":"9vXQjFdTaQw5XjUKsRK6N3WFCg5zMVca5Ze2Qqznn3AM"
}
] }, "receipt":{
"predecessorId":"test1.csandi.near",
"receipt":{
"Action":{
"actions":[
{
"FunctionCall":{
"args":"eyJpbml0aWFsX3ByaWNlIjoxLjksInNwYWNpbmciOjIsImFscGhhX2lkIjoidXNuIiwiYmV0YV9pZCI6IndyYXAubmVhciIsInN3YXBfZmVlX3JhdGUiOjAuMDAzLCJwcm90b2NvbF90b2xsIjowLjAxfQ==",
"deposit":"0",
"gas":200000000000000,
"methodName":"create_new_pool"
}
}
],
"gasPrice":"346069590",
"inputDataIds":[
],
"outputDataReceivers":[
],
"signerId":"test1.csandi.near",
"signerPublicKey":"ed25519:85yAx5mY8DinTWQfMn47cZTHMhZtLRAWZLpazYmetwno"
}
},
"receiptId":"GrXdFKA9byvCmxGiQkGc9iaFn88FfePk4tfJhvcTGMwc",
"receiverId":"dev-cliquidity-perk-jorge.near" } }
And as you can see in the json response,the following status:
"status":{
"Failure":{
"ActionError":{
"index":0,
"kind":{
"FunctionCallError":{
"ExecutionError":"Smart contract panicked: The contract is not initialized"
}
}
}
}
Anyway to fully understand how transactions/receipts work this document helped a lot.
We have created bot using Microsoft bot-framework which is integrated to Microsoft teams. We have created few adaptive cards for interactive conversation with bot. One of the Adaptive card is causing design issue in IPhone X Microsoft Teams Application.
We used Adaptive card template for building this card which displays the list of Tasks along with status of the task. Each task has Input.Toggle (Checkbox) and at the end a button will be displayed. When Checkbox's are selected and button is clicked
We are sending new card with task details where they can edit the status and so on. Please find the JSON data below.
Card Payload Editor Json Data:
{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Container",
"border": true,
"items": [
{
"$data": "{properties}",
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"id": "{id}",
"type": "Input.Toggle",
"title": " ",
"value": "false",
"wrap": false
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "Container",
"items": [
{
"type": "FactSet",
"facts": [
{
"$data": "{peers}",
"title": "{key}",
"value": "{value}"
}
]
}
],
"style": "emphasis"
}
]
}
]
}
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "{actionSubmitTitle}",
"horizontalAlignment": "center"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
Sample Data Editor:
"properties":[
{
"id":"InputToggle1",
"peers":[
{
"key":"Project",
"value":"' .$task->project_name. '"
},
{
"key":"Task",
"value":"'.$task->id.' - '.$task->heading.'"
},
{
"key":"Status",
"value":"'.$task->board_column.'"
}
]
},
{
"id":"InputToggle2",
"peers":[
{
"key":"Project",
"value":"' .$task->project_name. '"
},
{
"key":"Task",
"value":"'.$task->id.' - '.$task->heading.'"
},
{
"key":"Status",
"value":"'.$task->board_column.'"
}
]
},
{
"id":"InputToggle3",
"peers":[
{
"key":"Project",
"value":"' .$task->project_name. '"
},
{
"key":"Task",
"value":"'.$task->id.' - '.$task->heading.'"
},
{
"key":"Status",
"value":"'.$task->board_column.'"
}
]
},
{
"id":"InputToggle4",
"peers":[
{
"key":"Project",
"value":"' .$task->project_name. '"
},
{
"key":"Task",
"value":"'.$task->id.' - '.$task->heading.'"
},
{
"key":"Status",
"value":"'.$task->board_column.'"
}
]
}
],
"actionSubmitTitle":"Update Timesheet"
}
The InputToggle is inside the column set with width as auto and it is perfectly rendering in Microsoft Desktop and Android App but whereas in IOS app it is not showing
When we set the width property to stretch, InputToggle is getting displayed in IOS App in big size but in Desktop App and Android App the column is pushing and occupying much space.
Please help me so that we can display the Input.Toggle in IOS Microsoft Teams without breaking the design in Desktop and Android Teams App.
Edit: Adding final JSON sent to the bot. The columns in the column set will be changed dynamically based on the ask list in database.
{
"type":"AdaptiveCard",
"version":"1.0",
"body":[
{
"type":"Container",
"border":true,
"items":[
{
"type":"ColumnSet",
"columns":[
{
"type":"Column",
"width":"auto",
"items":[
{
"id":"inputToggle1",
"type":"Input.Toggle",
"title":" ",
"value":"false",
"wrap":false
}
]
},
{
"type":"Column",
"width":"stretch",
"items":[
{
"type":"Container",
"items":[
{
"type":"FactSet",
"facts":[
{
"title":"Project",
"value":"Project 1"
},
{
"title":"Task",
"value":"Task 1"
},
{
"title":"Status",
"value":"Pending"
}
]
}
],
"style":"emphasis"
}
]
}
]
},
{
"type":"ColumnSet",
"columns":[
{
"type":"Column",
"width":"auto",
"items":[
{
"id":"inputToggle2",
"type":"Input.Toggle",
"title":" ",
"value":"false",
"wrap":false
}
]
},
{
"type":"Column",
"width":"stretch",
"items":[
{
"type":"Container",
"items":[
{
"type":"FactSet",
"facts":[
{
"title":"Project",
"value":"Project 1"
},
{
"title":"Task",
"value":" Task 2"
},
{
"title":"Status",
"value":"Completed"
}
]
}
],
"style":"emphasis"
}
]
}
]
}
]
}
],
"actions":[
{
"type":"Action.Submit",
"title":"Update Timesheet",
"horizontalAlignment":"center"
}
],
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json"
}
Thank you.
For completion, this was caused by a bug and is tracked as an Github Issue here:
https://github.com/microsoft/AdaptiveCards/issues/4052#
I am rendering an adaptive card on a teams channel using Bot Framework. It renders the card fine, but the background image is different on a desktop client and mobile client. The first image shows the rendering on the desktop client and the second image is for the mobile client.
https://i.stack.imgur.com/mKl1z.png
https://i.stack.imgur.com/HAumI.jpg
Is there a way that I can change the way it renders on phone? Or add css to the Adaptive cards?
This is the JSON I've used to build the card:
{
$schema:"http://adaptivecards.io/schemas/adaptive-card.json",
type:"AdaptiveCard",
version:"1.0",
backgroundImage:"https://www.totalmortgage.com/images/claimed-blue.jpg",
backgroundImageMode:"stretch",
body:[
{
"type":"ColumnSet",
"columns":[
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"size":"Large",
"weight":"bolder",
"text":"Application Offer",
"wrap":true,
"maxLines":0
}
]
},
]
},
{
"type":"TextBlock",
"size":"medium",
"text":"**New Lead has arrived:**",
"wrap":true,
"maxLines":0
},
{
"type":"ColumnSet",
"columns":[
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"spacing":"small",
"size":"default",
"text":"**First Name** : ",
"wrap":true,
"maxLines":0,
"seperator":true
},
{
"type":"TextBlock",
"spacing":"small",
"size":"default",
"text":"**Last Name** : ",
"wrap":true,
"maxLines":0
}
]
},
]
},
{
"type":"TextBlock",
"spacing":"small",
"size":"default",
"text":"**Property State** : "+sfdata['property_state'],
"wrap":true,
"maxLines":0
}
]
};
Use version 1.1
{
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"version":"1.1",
"backgroundImage": {
"url": "https://www.totalmortgage.com/images/claimed-blue.jpg",
"fillMode": "repeat",
"horizontalAlignment": "left",
"VerticalAlignment ": "center"
},
"body":[
{
"type":"ColumnSet",
"columns":[
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"size":"Large",
"weight":"bolder",
"text":"Application Offer",
"wrap":true,
"maxLines":0
}
]
}
]
},
{
"type":"TextBlock",
"size":"medium",
"text":"**New Lead has arrived:**",
"wrap":true,
"maxLines":0
},
{
"type":"ColumnSet",
"columns":[
{
"type":"Column",
"items":[
{
"type":"TextBlock",
"spacing":"small",
"size":"default",
"text":"**First Name** : ",
"wrap":true,
"maxLines":0,
"seperator":true
},
{
"type":"TextBlock",
"spacing":"small",
"size":"default",
"text":"**Last Name** : ",
"wrap":true,
"maxLines":0
}
]
}
]
},
{
"type":"TextBlock",
"spacing":"small",
"size":"default",
"text":"**Property State** : ",
"wrap":true,
"maxLines":0
}
]
}
Check issue here:
https://github.com/Microsoft/AdaptiveCards/issues/477
PS: Your JSON Card has some invalid codes.
Always check in the Visualizer!
I am unable to connect using artillery.io with setting engine = socketio, please find my configuration json below
socket error {"type":"Transport error", "description":400}
"scenarios": [
{
"name": "my test",
"engine": "socketio",
"flow": [
{
"emit": {
"channel": "command",
"namespace": "command"
}
},
{
"think": 1
}
]
}
]
"scenarios": [
{
"name": "my test",
"engine": "socketio",
"flow": [
{
"emit": {
"channel": "command"
"data": "hello"
"namespace": "/command"
}
},
{
"think": 1
}
]
}
]
Please try using above command
I'm trying to achieve the following. My input JSON looks like this,
{
"data":{
"shipping_address":[
{
"cust_id":"CUST-123",
"street":"123 Main St",
"city":"Atlanta",
"state":"GA",
"zip":"12345"
},
{
"cust_id":"CUST-456",
"street":"456 Front St",
"city":"Philadelphia",
"state":"PA",
"zip":"23456"
}
],
"orders":[
{
"cust_id":"CUST-456",
"items":[
{
"quantity":"2",
"item_code":"ABC-111-222",
"cust_id":"CUST-456"
},
{
"quantity":"1",
"item_code":"DEF-999-01-001",
"cust_id":"CUST-456"
}
]
},
{
"cust_id":"CUST-123",
"items":[
{
"quantity":"10",
"item_code":"998-111-222",
"cust_id":"CUST-123"
}
]
}
],
"payment":[
{
"cust_id":"CUST-123",
"type":"VISA",
"card_no":"1234-1111-2222-3333",
"expiry":"06/2016",
"billing_add_same_as_shipping":"Y",
"first_name":"John",
"last_name":"Smith"
},
{
"cust_id":"CUST-456",
"type":"VISA",
"card_no":"5678-4444-8877-5544",
"expiry":"08/2016",
"billing_add_same_as_shipping":"N",
"first_name":"Steve",
"last_name":"Jones"
}
],
"billing_address":[
{
"cust_id":"CUST-456",
"street":"7788 Back St",
"city":"Gainesville",
"state":"FL",
"zip":"33444"
}
]
}
}
I would like to flatten out this json into two separate jsons
{
"data":{
"shipping_address":{
"cust_id":"CUST-456",
"street":"456 Front St",
"city":"Philadelphia",
"state":"PA",
"zip":"23456"
},
"orders":{
"cust_id":"CUST-456",
"items":[
{
"quantity":"2",
"item_code":"ABC-111-222",
"cust_id":"CUST-456"
},
{
"quantity":"1",
"item_code":"DEF-999-01-001",
"cust_id":"CUST-456"
}
]
},
"payment":{
"cust_id":"CUST-456",
"type":"VISA",
"card_no":"5678-4444-8877-5544",
"expiry":"08/2016",
"billing_add_same_as_shipping":"N",
"first_name":"Steve",
"last_name":"Jones"
},
"billing_address":{
"cust_id":"CUST-456",
"street":"7788 Back St",
"city":"Gainesville",
"state":"FL",
"zip":"33444"
}
}
}
and
{
"data":{
"shipping_address":{
"cust_id":"CUST-123",
"street":"123 Main St",
"city":"Atlanta",
"state":"GA",
"zip":"12345"
},
"orders":{
"cust_id":"CUST-123",
"items":[
{
"quantity":"10",
"item_code":"998-111-222",
"cust_id":"CUST-123"
}
]
},
"payment":{
"cust_id":"CUST-123",
"type":"VISA",
"card_no":"1234-1111-2222-3333",
"expiry":"06/2016",
"billing_add_same_as_shipping":"Y",
"first_name":"John",
"last_name":"Smith"
}
}
}
Is there an easy way in Ruby to perform this without any looping/parsing each fragment of the input json (i.e. by doing any JSON Mapping)?
This is my current solution
Note: my input is a POJO from Java where evaluationTarget contains the input JSON
def json_flattening(input)
customer_order_hash = Hash.new
orders_data = input.evaluationTarget
orders_data.keys.each do |orders_keys|
orders_data[orders_keys].each do |orders_keys_data|
if !customer_order_hash.has_key?(orders_keys_data['cust_id']) then
each_order_hash = Hash.new
customer_order_hash[orders_keys_data['cust_id']] = each_order_hash
end
customer_order_hash[orders_keys_data['cust_id']][orders_keys] = orders_keys_data
end
end
customer_order_hash.keys.each do |cust_id|
puts customer_order_hash[cust_id]
end
end
{"shipping_address"=>{"cust_id"=>"CUST-123", "street"=>"123 Main St", "city"=>"Atlanta", "state"=>"GA", "zip"=>"12345"}, "orders"=>{"cust_id"=>"CUST-123", "items"=>#<Java::NetSfJson::JSONArray:0x69522a14>}, "payment"=>{"cust_id"=>"CUST-123", "type"=>"VISA", "card_no"=>"1234-1111-2222-3333", "expiry"=>"06/2016", "billing_add_same_as_shipping"=>"Y", "first_name"=>"John", "last_name"=>"Smith"}}
{"shipping_address"=>{"cust_id"=>"CUST-456", "street"=>"456 Front St", "city"=>"Philadelphia", "state"=>"PA", "zip"=>"23456"}, "orders"=>{"cust_id"=>"CUST-456", "items"=>#<Java::NetSfJson::JSONArray:0x40030597>}, "payment"=>{"cust_id"=>"CUST-456", "type"=>"VISA", "card_no"=>"5678-4444-8877-5544", "expiry"=>"08/2016", "billing_add_same_as_shipping"=>"N", "first_name"=>"Steve", "last_name"=>"Jones"}, "billing_address"=>{"cust_id"=>"CUST-456", "street"=>"7788 Back St", "city"=>"Gainesville", "state"=>"FL", "zip"=>"33444"}}