dynamics_crm 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +1 -0
  4. data/.travis.yml +9 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +104 -0
  8. data/Rakefile +9 -0
  9. data/dynamics_crm.gemspec +28 -0
  10. data/lib/dynamics_crm/client.rb +295 -0
  11. data/lib/dynamics_crm/metadata/attribute_metadata.rb +42 -0
  12. data/lib/dynamics_crm/metadata/entity_metadata.rb +24 -0
  13. data/lib/dynamics_crm/metadata/retrieve_all_entities_response.rb +21 -0
  14. data/lib/dynamics_crm/metadata/retrieve_attribute_response.rb +16 -0
  15. data/lib/dynamics_crm/metadata/retrieve_entity_response.rb +17 -0
  16. data/lib/dynamics_crm/metadata/xml_document.rb +39 -0
  17. data/lib/dynamics_crm/response/create_result.rb +15 -0
  18. data/lib/dynamics_crm/response/execute_result.rb +26 -0
  19. data/lib/dynamics_crm/response/result.rb +78 -0
  20. data/lib/dynamics_crm/response/retrieve_multiple_result.rb +38 -0
  21. data/lib/dynamics_crm/response/retrieve_result.rb +20 -0
  22. data/lib/dynamics_crm/version.rb +3 -0
  23. data/lib/dynamics_crm/xml/attributes.rb +163 -0
  24. data/lib/dynamics_crm/xml/column_set.rb +34 -0
  25. data/lib/dynamics_crm/xml/criteria.rb +54 -0
  26. data/lib/dynamics_crm/xml/entity.rb +61 -0
  27. data/lib/dynamics_crm/xml/entity_reference.rb +56 -0
  28. data/lib/dynamics_crm/xml/fault.rb +42 -0
  29. data/lib/dynamics_crm/xml/fetch_expression.rb +27 -0
  30. data/lib/dynamics_crm/xml/message_builder.rb +222 -0
  31. data/lib/dynamics_crm/xml/message_parser.rb +68 -0
  32. data/lib/dynamics_crm/xml/orders.rb +36 -0
  33. data/lib/dynamics_crm/xml/page_info.rb +38 -0
  34. data/lib/dynamics_crm/xml/query.rb +38 -0
  35. data/lib/dynamics_crm.rb +46 -0
  36. data/spec/fixtures/associate_response.xml +17 -0
  37. data/spec/fixtures/create_response.xml +19 -0
  38. data/spec/fixtures/delete_response.xml +16 -0
  39. data/spec/fixtures/disassociate_response.xml +17 -0
  40. data/spec/fixtures/fetch_xml_response.xml +120 -0
  41. data/spec/fixtures/receiver_fault.xml +27 -0
  42. data/spec/fixtures/request_security_token_response.xml +62 -0
  43. data/spec/fixtures/retrieve_account_all_columns.xml +402 -0
  44. data/spec/fixtures/retrieve_all_entities.xml +614 -0
  45. data/spec/fixtures/retrieve_attribute_identifier_response.xml +117 -0
  46. data/spec/fixtures/retrieve_attribute_picklist_response.xml +1097 -0
  47. data/spec/fixtures/retrieve_attribute_response.xml +126 -0
  48. data/spec/fixtures/retrieve_entity_response.xml +671 -0
  49. data/spec/fixtures/retrieve_multiple_result.xml +67 -0
  50. data/spec/fixtures/sender_fault.xml +34 -0
  51. data/spec/fixtures/update_response.xml +16 -0
  52. data/spec/fixtures/who_am_i_result.xml +35 -0
  53. data/spec/lib/client_spec.rb +230 -0
  54. data/spec/lib/metadata/entity_metadata_spec.rb +24 -0
  55. data/spec/lib/metadata/retrieve_all_entities_response_spec.rb +26 -0
  56. data/spec/lib/metadata/retrieve_attribute_response_spec.rb +65 -0
  57. data/spec/lib/metadata/retrieve_entity_response_spec.rb +24 -0
  58. data/spec/lib/response/execute_result_spec.rb +20 -0
  59. data/spec/lib/response/retrieve_multiple_spec.rb +34 -0
  60. data/spec/lib/response/retrieve_result_spec.rb +67 -0
  61. data/spec/lib/xml/attributes_spec.rb +39 -0
  62. data/spec/lib/xml/column_set_spec.rb +19 -0
  63. data/spec/lib/xml/entity_reference_spec.rb +47 -0
  64. data/spec/lib/xml/entity_spec.rb +63 -0
  65. data/spec/lib/xml/fault_spec.rb +41 -0
  66. data/spec/lib/xml/query_spec.rb +43 -0
  67. data/spec/spec_helper.rb +17 -0
  68. data/spec/support/fixture_helpers.rb +14 -0
  69. metadata +240 -0
@@ -0,0 +1,126 @@
1
+ <s:Envelope xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:a='http://www.w3.org/2005/08/addressing' xmlns:u='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>
2
+ <s:Header>
3
+ <a:Action s:mustUnderstand='1'>
4
+ http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/ExecuteResponse
5
+ </a:Action>
6
+ <a:RelatesTo>urn:uuid:c78e0fb0-3ef4-444f-bde6-bdd82b1b209e</a:RelatesTo>
7
+ <ActivityId CorrelationId='bad73f2c-ef49-4a3f-8d1d-6f28132572fd' xmlns='http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics'>00000000-0000-0000-0000-000000000000</ActivityId>
8
+ <o:Security s:mustUnderstand='1' xmlns:o='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'>
9
+ <u:Timestamp u:Id='_0'>
10
+ <u:Created>2014-02-24T18:47:09.029Z</u:Created>
11
+ <u:Expires>2014-02-24T18:52:09.029Z</u:Expires>
12
+ </u:Timestamp>
13
+ </o:Security>
14
+ </s:Header>
15
+ <s:Body>
16
+ <ExecuteResponse xmlns='http://schemas.microsoft.com/xrm/2011/Contracts/Services'>
17
+ <ExecuteResult i:type='b:RetrieveAttributeResponse' xmlns:b='http://schemas.microsoft.com/xrm/2011/Contracts' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
18
+ <b:ResponseName>RetrieveAttribute</b:ResponseName>
19
+ <b:Results xmlns:c='http://schemas.datacontract.org/2004/07/System.Collections.Generic'>
20
+ <b:KeyValuePairOfstringanyType>
21
+ <c:key>AttributeMetadata</c:key>
22
+ <c:value i:type='d:MoneyAttributeMetadata' xmlns:d='http://schemas.microsoft.com/xrm/2011/Metadata'>
23
+ <d:MetadataId>79194881-c699-e311-9752-6c3be5a87df0</d:MetadataId>
24
+ <d:HasChanged i:nil='true'/>
25
+ <d:AttributeOf i:nil='true'/>
26
+ <d:AttributeType>Money</d:AttributeType>
27
+ <d:CanBeSecuredForCreate>true</d:CanBeSecuredForCreate>
28
+ <d:CanBeSecuredForRead>true</d:CanBeSecuredForRead>
29
+ <d:CanBeSecuredForUpdate>true</d:CanBeSecuredForUpdate>
30
+ <d:CanModifyAdditionalSettings>
31
+ <b:CanBeChanged>true</b:CanBeChanged>
32
+ <b:ManagedPropertyLogicalName>canmodifyadditionalsettings</b:ManagedPropertyLogicalName>
33
+ <b:Value>true</b:Value>
34
+ </d:CanModifyAdditionalSettings>
35
+ <d:ColumnNumber>32</d:ColumnNumber>
36
+ <d:DeprecatedVersion i:nil='true'/>
37
+ <d:Description>
38
+ <b:LocalizedLabels>
39
+ <b:LocalizedLabel>
40
+ <d:MetadataId i:nil='true'/>
41
+ <d:HasChanged i:nil='true'/>
42
+ <b:IsManaged>false</b:IsManaged>
43
+ <b:Label/>
44
+ <b:LanguageCode>1033</b:LanguageCode>
45
+ </b:LocalizedLabel>
46
+ </b:LocalizedLabels>
47
+ <b:UserLocalizedLabel>
48
+ <d:MetadataId i:nil='true'/>
49
+ <d:HasChanged i:nil='true'/>
50
+ <b:IsManaged>false</b:IsManaged>
51
+ <b:Label/>
52
+ <b:LanguageCode>1033</b:LanguageCode>
53
+ </b:UserLocalizedLabel>
54
+ </d:Description>
55
+ <d:DisplayName>
56
+ <b:LocalizedLabels>
57
+ <b:LocalizedLabel>
58
+ <d:MetadataId i:nil='true'/>
59
+ <d:HasChanged i:nil='true'/>
60
+ <b:IsManaged>false</b:IsManaged>
61
+ <b:Label>Value</b:Label>
62
+ <b:LanguageCode>1033</b:LanguageCode>
63
+ </b:LocalizedLabel>
64
+ </b:LocalizedLabels>
65
+ <b:UserLocalizedLabel>
66
+ <d:MetadataId i:nil='true'/>
67
+ <d:HasChanged i:nil='true'/>
68
+ <b:IsManaged>false</b:IsManaged>
69
+ <b:Label>Value</b:Label>
70
+ <b:LanguageCode>1033</b:LanguageCode>
71
+ </b:UserLocalizedLabel>
72
+ </d:DisplayName>
73
+ <d:EntityLogicalName>new_tinderboxdocument</d:EntityLogicalName>
74
+ <d:IsAuditEnabled>
75
+ <b:CanBeChanged>true</b:CanBeChanged>
76
+ <b:ManagedPropertyLogicalName>canmodifyauditsettings</b:ManagedPropertyLogicalName>
77
+ <b:Value>false</b:Value>
78
+ </d:IsAuditEnabled>
79
+ <d:IsCustomAttribute>true</d:IsCustomAttribute>
80
+ <d:IsCustomizable>
81
+ <b:CanBeChanged>true</b:CanBeChanged>
82
+ <b:ManagedPropertyLogicalName>iscustomizable</b:ManagedPropertyLogicalName>
83
+ <b:Value>true</b:Value>
84
+ </d:IsCustomizable>
85
+ <d:IsManaged>false</d:IsManaged>
86
+ <d:IsPrimaryId>false</d:IsPrimaryId>
87
+ <d:IsPrimaryName>false</d:IsPrimaryName>
88
+ <d:IsRenameable>
89
+ <b:CanBeChanged>true</b:CanBeChanged>
90
+ <b:ManagedPropertyLogicalName>isrenameable</b:ManagedPropertyLogicalName>
91
+ <b:Value>true</b:Value>
92
+ </d:IsRenameable>
93
+ <d:IsSecured>false</d:IsSecured>
94
+ <d:IsValidForAdvancedFind>
95
+ <b:CanBeChanged>true</b:CanBeChanged>
96
+ <b:ManagedPropertyLogicalName>canmodifysearchsettings</b:ManagedPropertyLogicalName>
97
+ <b:Value>true</b:Value>
98
+ </d:IsValidForAdvancedFind>
99
+ <d:IsValidForCreate>true</d:IsValidForCreate>
100
+ <d:IsValidForRead>true</d:IsValidForRead>
101
+ <d:IsValidForUpdate>true</d:IsValidForUpdate>
102
+ <d:LinkedAttributeId i:nil='true'/>
103
+ <d:LogicalName>new_value</d:LogicalName>
104
+ <d:RequiredLevel>
105
+ <b:CanBeChanged>true</b:CanBeChanged>
106
+ <b:ManagedPropertyLogicalName>canmodifyrequirementlevelsettings</b:ManagedPropertyLogicalName>
107
+ <b:Value>None</b:Value>
108
+ </d:RequiredLevel>
109
+ <d:SchemaName>new_value</d:SchemaName>
110
+ <d:AttributeTypeName xmlns:e='http://schemas.microsoft.com/xrm/2013/Metadata'>
111
+ <e:Value>MoneyType</e:Value>
112
+ </d:AttributeTypeName>
113
+ <d:IntroducedVersion>1.0</d:IntroducedVersion>
114
+ <d:CalculationOf i:nil='true'/>
115
+ <d:ImeMode>Auto</d:ImeMode>
116
+ <d:MaxValue>1000000000</d:MaxValue>
117
+ <d:MinValue>0</d:MinValue>
118
+ <d:Precision>2</d:Precision>
119
+ <d:PrecisionSource>0</d:PrecisionSource>
120
+ </c:value>
121
+ </b:KeyValuePairOfstringanyType>
122
+ </b:Results>
123
+ </ExecuteResult>
124
+ </ExecuteResponse>
125
+ </s:Body>
126
+ </s:Envelope>