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,117 @@
1
+ <?xml version="1.0"?>
2
+ <s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/ExecuteResponse</a:Action>
5
+ <a:RelatesTo>urn:uuid:ad125f8e-b10a-4639-96a9-4b9d6094ec8a</a:RelatesTo>
6
+ <ActivityId CorrelationId="b49628f7-1343-478c-9683-dc642ac96dfa" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">00000000-0000-0000-0000-000000000000</ActivityId>
7
+ <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
8
+ <u:Timestamp u:Id="_0">
9
+ <u:Created>2014-02-26T06:10:17.418Z</u:Created>
10
+ <u:Expires>2014-02-26T06:15:17.418Z</u:Expires>
11
+ </u:Timestamp>
12
+ </o:Security>
13
+ </s:Header>
14
+ <s:Body>
15
+ <ExecuteResponse xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
16
+ <ExecuteResult i:type="b:RetrieveAttributeResponse" xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
17
+ <b:ResponseName>RetrieveAttribute</b:ResponseName>
18
+ <b:Results xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
19
+ <b:KeyValuePairOfstringanyType>
20
+ <c:key>AttributeMetadata</c:key>
21
+ <c:value i:type="d:AttributeMetadata" xmlns:d="http://schemas.microsoft.com/xrm/2011/Metadata">
22
+ <d:MetadataId>f8cd5db9-cee8-4845-8cdd-cd4f504957e7</d:MetadataId>
23
+ <d:HasChanged i:nil="true"/>
24
+ <d:AttributeOf i:nil="true"/>
25
+ <d:AttributeType>Uniqueidentifier</d:AttributeType>
26
+ <d:CanBeSecuredForCreate>false</d:CanBeSecuredForCreate>
27
+ <d:CanBeSecuredForRead>false</d:CanBeSecuredForRead>
28
+ <d:CanBeSecuredForUpdate>false</d:CanBeSecuredForUpdate>
29
+ <d:CanModifyAdditionalSettings>
30
+ <b:CanBeChanged>false</b:CanBeChanged>
31
+ <b:ManagedPropertyLogicalName>canmodifyadditionalsettings</b:ManagedPropertyLogicalName>
32
+ <b:Value>true</b:Value>
33
+ </d:CanModifyAdditionalSettings>
34
+ <d:ColumnNumber>1</d:ColumnNumber>
35
+ <d:DeprecatedVersion i:nil="true"/>
36
+ <d:Description>
37
+ <b:LocalizedLabels>
38
+ <b:LocalizedLabel>
39
+ <d:MetadataId i:nil="true"/>
40
+ <d:HasChanged i:nil="true"/>
41
+ <b:IsManaged>true</b:IsManaged>
42
+ <b:Label>Unique identifier of the account.</b:Label>
43
+ <b:LanguageCode>1033</b:LanguageCode>
44
+ </b:LocalizedLabel>
45
+ </b:LocalizedLabels>
46
+ <b:UserLocalizedLabel>
47
+ <d:MetadataId i:nil="true"/>
48
+ <d:HasChanged i:nil="true"/>
49
+ <b:IsManaged>true</b:IsManaged>
50
+ <b:Label>Unique identifier of the account.</b:Label>
51
+ <b:LanguageCode>1033</b:LanguageCode>
52
+ </b:UserLocalizedLabel>
53
+ </d:Description>
54
+ <d:DisplayName>
55
+ <b:LocalizedLabels>
56
+ <b:LocalizedLabel>
57
+ <d:MetadataId i:nil="true"/>
58
+ <d:HasChanged i:nil="true"/>
59
+ <b:IsManaged>true</b:IsManaged>
60
+ <b:Label>Account</b:Label>
61
+ <b:LanguageCode>1033</b:LanguageCode>
62
+ </b:LocalizedLabel>
63
+ </b:LocalizedLabels>
64
+ <b:UserLocalizedLabel>
65
+ <d:MetadataId i:nil="true"/>
66
+ <d:HasChanged i:nil="true"/>
67
+ <b:IsManaged>true</b:IsManaged>
68
+ <b:Label>Account</b:Label>
69
+ <b:LanguageCode>1033</b:LanguageCode>
70
+ </b:UserLocalizedLabel>
71
+ </d:DisplayName>
72
+ <d:EntityLogicalName>account</d:EntityLogicalName>
73
+ <d:IsAuditEnabled>
74
+ <b:CanBeChanged>false</b:CanBeChanged>
75
+ <b:ManagedPropertyLogicalName>canmodifyauditsettings</b:ManagedPropertyLogicalName>
76
+ <b:Value>false</b:Value>
77
+ </d:IsAuditEnabled>
78
+ <d:IsCustomAttribute>false</d:IsCustomAttribute>
79
+ <d:IsCustomizable>
80
+ <b:CanBeChanged>false</b:CanBeChanged>
81
+ <b:ManagedPropertyLogicalName>iscustomizable</b:ManagedPropertyLogicalName>
82
+ <b:Value>true</b:Value>
83
+ </d:IsCustomizable>
84
+ <d:IsManaged>true</d:IsManaged>
85
+ <d:IsPrimaryId>true</d:IsPrimaryId>
86
+ <d:IsPrimaryName>false</d:IsPrimaryName>
87
+ <d:IsRenameable>
88
+ <b:CanBeChanged>false</b:CanBeChanged>
89
+ <b:ManagedPropertyLogicalName>isrenameable</b:ManagedPropertyLogicalName>
90
+ <b:Value>true</b:Value>
91
+ </d:IsRenameable>
92
+ <d:IsSecured>false</d:IsSecured>
93
+ <d:IsValidForAdvancedFind>
94
+ <b:CanBeChanged>true</b:CanBeChanged>
95
+ <b:ManagedPropertyLogicalName>canmodifysearchsettings</b:ManagedPropertyLogicalName>
96
+ <b:Value>true</b:Value>
97
+ </d:IsValidForAdvancedFind>
98
+ <d:IsValidForCreate>true</d:IsValidForCreate>
99
+ <d:IsValidForRead>true</d:IsValidForRead>
100
+ <d:IsValidForUpdate>false</d:IsValidForUpdate>
101
+ <d:LinkedAttributeId i:nil="true"/>
102
+ <d:LogicalName>accountid</d:LogicalName>
103
+ <d:RequiredLevel>
104
+ <b:CanBeChanged>false</b:CanBeChanged>
105
+ <b:ManagedPropertyLogicalName>canmodifyrequirementlevelsettings</b:ManagedPropertyLogicalName>
106
+ <b:Value>SystemRequired</b:Value>
107
+ </d:RequiredLevel>
108
+ <d:SchemaName>AccountId</d:SchemaName>
109
+ <d:AttributeTypeName i:nil="true" xmlns:e="http://schemas.microsoft.com/xrm/2013/Metadata"/>
110
+ <d:IntroducedVersion>5.0.0.0</d:IntroducedVersion>
111
+ </c:value>
112
+ </b:KeyValuePairOfstringanyType>
113
+ </b:Results>
114
+ </ExecuteResult>
115
+ </ExecuteResponse>
116
+ </s:Body>
117
+ </s:Envelope>